GithubHelp home page GithubHelp logo

isabella232 / dnsparser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pixie-io/dnsparser

0.0 0.0 0.0 1.71 MB

Simple C++ DNS payload parser

CMake 24.49% Batchfile 0.62% Shell 2.54% C++ 72.35%

dnsparser's Introduction

dnsparser - Simple DNS payload parser in C++

Intended for parsing DNS packet payload. Builds as a static library. See dnssniffer for an example of using it in an application.

  • Does not need entire payload
  • Does not assume payload is DNS
  • Supports IPV4 / IPV6 Answer records.
  • Not thread-safe... restrict DnsParser.parse to single thread.
  • Speedup upto 30% by not tracking paths.
  • Speedup upto 400% by ignoring CNAMEs all together.

Example Usage:

DnsParser *parser = DnsParserNew(myListener, isPathEnabled, ignoreCnames);
parser->parse((char *)data.data(), data.size());

Build

osx/linux: sh build.sh Windows: build.bat

Run Google unit tests

osx/linux: sh test.sh

Debug

On MacOS, use XCode to open .xcodeproj file placed in the platform/Darwin-x86_64/ dir after running build.sh.

On Windows, use Visual Studio to open the .sln file placed in platform/win32-msvc2012/ dir after running build.sh.

And, hey... there's always command-line lldb or gdb. ๐Ÿ‘๐Ÿผ

License

This code is licensed under the terms of the Apache 2 license.

dnsparser's People

Contributors

connectiblutz avatar oazizi000 avatar packetzero avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.