Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python Nmap Scour sP script for linux

Reply
Thread Tools

Python Nmap Scour sP script for linux

 
 
Daniel Folkes
Guest
Posts: n/a
 
      11-28-2007
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>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Nmap script linux version Daniel Folkes Python 0 11-28-2007 05:54 PM
10x10 - A Designer Way to Scour the News Silverstrand Media 0 09-08-2006 01:29 PM
nmap, ethereal, tcpdump, ngrep etc for Windows BOBAH.XPEHOB@gmail.com Computer Security 0 08-19-2005 02:03 PM
Nmap Malloc etc... lasek C Programming 5 11-04-2004 12:01 PM
Hiding a PIX from nmap and port-scanners. Francois Labreque Cisco 1 11-11-2003 06:42 AM



Advertisments