Exploit-DB updates

Tuesday, May 3, 2011

Bash scripting friendly Java Ip Parser

Well I made a simple ip parser in Java to grab ips from a given file, mainly used for parsing nmap logs and writing them to a file in a list format for use with other tools. This was very useful, but I hadn't given it any thought to further automate the process by making the parser bash friendly by allowing command line arguments. Now you can tie it together with other tools of your liking with simple command like so;

nmap 192.168.1.1/24 -p 22 --open -oG sshlist; java -jar ips.jar sshlist; medusa -u root -H ips -P /root/passwords.txt -e ns -f -v 6 -O sshcrack -M ssh

You can find the edited version of the source below;

Jar - http://www.mediafire.com/?c3hpb22nk3lj2a3

NOTE: You can remove duplicate IP's from the list by piping the Java parsers output to the unix command "uniq", which will filter out the duplicates.


java -jar ips.jar nlog | uniq > iplist.txt

No comments:

Post a Comment