GithubHelp home page GithubHelp logo

timkoopmans / rdns-fs Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 21.79 MB

Split a rapid7 Reverse DNS (RDNS) file into directories based on IP address

License: MIT License

Go 94.54% Makefile 5.46%

rdns-fs's Introduction

rdns-fs

This binary parses a reverse DNS json file from Rapid 7 and splits it onto the local file system based on the first octect of the IP. In addition, it will include IPs that match your CIDR filter. This is useful for specifying the IP range of a cloud provider for example. This partitioning allows for faster searches of records by IP.

The output files will look like:

rdns.<firstOctet>.0.0.0.json

with each timestamp being a copy of the PTR record at that point in time e.g.

{"timestamp":"1609324571","name":"1.113.142.231","value":"em1-113-142-231.pool.e-mobile.ne.jp","type":"ptr"}

To execute:

./rdns-fs -file <path-to-your>-rdns.json -cdir <path-to-your-cidrs>.txt -workers <number of concurrent workers, default 50>

I am using RDAP to help discover the AWS CIDR range e.g.

curl -s https://rdap.arin.net/registry/entity/AT-88-Z | jq -cr '.networks[].cidr0_cidrs[] | .v4prefix + "/" + (.length|tostring)' > cidrs.txt
curl -s https://rdap.arin.net/registry/entity/AMAZO-4 | jq -cr '.networks[].cidr0_cidrs[] | .v4prefix + "/" + (.length|tostring)' >> cidrs.txt

From there on, it is up to your imagination as to what you want to use this information for...

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.