Python Nmap script linux version

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!

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...')


Tell me what you think....
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top