Giter Site home page Giter Site logo

ozzyprojects / ip_domain_locator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 69 KB

A perl script to parse network logs (tcpdump...) looking for any info for each domain name and IP (company, location etc)

License: GNU General Public License v2.0

Perl 100.00%
network-analysis ip-locator tcpdump dns domain-name-search dns-tracker parser network-analyzer boolean-expression-parser penetration-testing

ip_domain_locator's Introduction

IP DOMAIN LOCATOR

A perl script to parse network logs (tcpdump...) looking for any info for each domain name and IP (company, location etc)

COMING SOON : troubleshooting DNS engine to check legitimity of each DNS request.

A perl script to use with any network log recording file, which gonna parse it and grab all domain names and IP.

Next step, the script will look for any informations about theses IP and domain names avoiding garbage datas (private IP etc...) : company name, location, root DNS, city etc...

All these informations will be sorted (according to criterias provided by user). For exemple, the might includes location, domain names, company. About DNS traffic,

the filter applied can be the querry type (AAAA, A, CNAME....).

The script works with a ligthweight embeded boolean logical parser as filter. It allow users to build complex filters with many boolean expression.

Logical operators accepted are : || (or), && (and), ! (not) and parenthesis, following rule of operator precedence.

Exemple of filters allowed for domain names:

( google && .com ) || ( dns || .org )

godaddy || cloudflare || ( aws && amazon )

there is only one rule : minimum one space between each token or the parser will fail to treat expression.

Above one token or more, the logical expression has to be a single quoted string

Here is a non-exhaustive list of options that might be used to make your research more accurate :

--filter|-s [expression] : filter based on complex logical expression to target only some domain names

--fiilter-dns|-n [flag] : flag = if enabled, extract only main domain name (the root part), otherwise, keep all

--querry-type|-q [flag] : querry filter based on complex logical expression to target only custom types of DNS querries (CNAMES, AAAA, SOA...)

--max|-c [integer] : maximum number of requests to do before quiting. 0 or negative value -> infinite loop (default)

--verbose|-v [flag] : verbose mode enabled displays more infos about IP or domain names but works slower than default mode

--help|-h [flag] : displays all options

the --file|-f [file input] [file output] option is the only one required

The file input is the file to work on and the file output is the name of CSV filename that will be created by the script to record all infos.

Example of some command lines :

perl ip_domain_locator.pl -f dnslog output.csv -s '( cloud && .com ) || ( google && syndic )' -n -q 'AAAA || CNAME' -v

With these options, the script will target only filter based domain names and querry types, keeping only the root part of domain names (-n) and will display infos

such as company name, city, country, authoritative DNS, contact.

perl ip_domain_locator.pl -f tcpdumplog output.csv -c 50

The script here will target all domain names but will stop after 50 requests.

In verbose mode, the script creates a special record file named verboselog which hold all these infos.

But, with --quiet-verbose|-qv option, you can redirect the output to stdout, without any file created.

ip_domain_locator's People

Contributors

ozzyprojects avatar

Watchers

 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.