Coder Social home page Coder Social logo

merge-nmap-masscan's Introduction

merge-nmap-masscan

A quick and ditry utility that can be used for merging NMAP's CSV file (Use this to convert NMAP XML to CSV) and Masscan's List file (use the -oL flag to generate a list file for masscan output) into one consolidated CSV file to be used in other automation and workflows.

NMAP file looks like this:

Hostname,IPAddress,Port,Protocol,Servicename,Servicestate
anshumanbhartiya.com,104.198.14.52,80,tcp,tcpwrapped,open
anshumanbhartiya.com,104.198.14.52,443,tcp,tcpwrapped,open
anshumanbhartiya.com,104.198.14.52,4443,tcp,tcpwrapped,open
github.anshumanbhartiya.com,185.199.110.153,80,tcp,tcpwrapped,open
github.anshumanbhartiya.com,185.199.110.153,443,tcp,tcpwrapped,open
yolo.anshumanbhartiya.com,1.2.3.4,999,tcp,tcpwrapped,open

Masscan file looks like this:

#masscan
open tcp 43 104.198.14.52 1529229065
open tcp 443 185.199.110.153 1529229065
open tcp 4443 104.198.14.52 1529229065
open tcp 80 104.198.14.52 1529229065
open tcp 80 185.199.110.153 1529229065
open tcp 8000 185.199.110.153 1529229065
open tcp 8080 1.2.3.4 1529229065
open tcp 8080 104.198.14.52 1529229065
open tcp 8800 185.199.110.153 1529229065
# end

The final merged file will look like this:

Hostname,IPAddress,Port,Protocol,Servicename,Servicestate
anshumanbhartiya.com,104.198.14.52,80,tcp,tcpwrapped,open
anshumanbhartiya.com,104.198.14.52,443,tcp,tcpwrapped,open
anshumanbhartiya.com,104.198.14.52,4443,tcp,tcpwrapped,open
github.anshumanbhartiya.com,185.199.110.153,80,tcp,tcpwrapped,open
github.anshumanbhartiya.com,185.199.110.153,443,tcp,tcpwrapped,open
yolo.anshumanbhartiya.com,1.2.3.4,999,tcp,tcpwrapped,open
anshumanbhartiya.com,104.198.14.52,43,tcp,NA,open
github.anshumanbhartiya.com,185.199.110.153,8000,tcp,NA,open
yolo.anshumanbhartiya.com,1.2.3.4,8080,tcp,NA,open
anshumanbhartiya.com,104.198.14.52,8080,tcp,NA,open
github.anshumanbhartiya.com,185.199.110.153,8800,tcp,NA,open

The above masscan and nmap files are provided with the repo and the Docker image as well!!

Running

Either run with defaults - go run main.go

OR

Specify the files - go run main.go -masscanFile <> -nmapFile <> -outFile <>

Don't have GO? Use Docker instead

docker run -it abhartiya/tools_mergenmapmasscan

merge-nmap-masscan's People

Contributors

anshumanbh 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.