Tuesday 26 November 2013

Nmap && Testing syntax Highlighter

Hi All,

A friend of mine wrote  a bash script for nmap. I stole it and modified it.

 

So here they are, will explain what they do and hopefully

the syntax works.

#!/bin/bash

#add IPs
#discovery script

IPs=('x.x.x.x')

totalIPs=${#IPs[@]}



for (( i=0; i < totalIPs; i++)); do

echo "[+] Testing $(($i+1)) / $totalIPs"

nmap -p1-65535 -vv --max-rate 1000 -Pn -oA –-script discovery ${IPs[$i]} ${IPs[$i]}

#nmap -T2 -F -vv -Pn -oA ${IPs[$i]} ${IPs[$i]}

done

echo "[+] Scan complete"

Tested: and it works. really annoying to have to go to source add the tags :(.


Any how: explanation of the syntax:


Effectively it takes IP addresses and places them into nmap. It creates nmap output individually for each IP.


 


It searches all ports, assumes they are up (-Pn), ouputs to all formats and runs the script discovery.


 


I have more but for now its to test the syntax Highlighting.


 


Am currently downloading Visual Studio express as  @troyhunt linked http://plugins.live.com/writer/detail/paste-from-visual-studio. This allows copy paste direct from VS.


 


Hopefully it works as intended with the Blogger infrastructure underneath Live writer… eep!


Another thing, spell checker wants to spell check the code :( :(!


 


Cheers


 


Wish me luck

No comments:

Post a Comment