471,354 Members | 1,521 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

Python Nmap Scour sP script for linux

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 = ''
ip1 = ip[:3]
ips = []
os.system("nmap -sP "+fn)
f = open(fn)
for line in f:
if ip1 in line:


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

Nov 28 '07 #1
0 2258

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Logan | last post: by
5 posts views Thread by Ben Finney | last post: by
34 posts views Thread by Ville Voipio | last post: by
5 posts views Thread by lasek | last post: by
reply views Thread by Daniel Folkes | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.