Python Nmap Scour sP script for linux

D

Daniel Folkes

I made this script for fun. you need to have Nmap installed on your
linux computer and it will find all the computers on the network and
then run Nmap on it.

Hope you enjoy!

<code>

import os
fn = 'i.result'
ip = '192.168.1.1-255'
ip1 = ip[:3]
ips = []
os.system("nmap -sP 192.168.1.1-255 > "+fn)
f = open(fn)
try:
for line in f:
if ip1 in line:
ips.append(line[5:-19])

finally:
f.close()

os.system("clear")
for i in ips:
print '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='
os.system("nmap "+i)
print '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='
raw_input('press to continue...')

</code>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top