Tag Archives: nmap

Nmap scripting.

I’ve toyed with nmap tonight to try and speed up some scripting across the lan scripts – currently I have a script that copies files across the lan, by checking each ip in turn to see if the machine is there and then copies it across – it’s very laborious and slow – I started it at 6pm tonight and it’s still running now at 10.24pm (It copies 3*100mb files across the lan).
I think by using nmap to ping sweep the lan and feed the results to a loop batch file it’ll be much quicker.
The nmap and dos script is this :-

nmap -sP 192.168.98.0/24 -oG pclist.txt
for /F “skip=2 tokens=2” %%i in (‘find “Status: Up” pclist.txt’) do echo %%i is alive!

Just replace the echo bit with the command you want to run.