Python Nmap script linux version

Discussion in 'Python' started by Daniel Folkes, Nov 28, 2007.

  1. 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....
     
    Daniel Folkes, Nov 28, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lasek

    Nmap Malloc etc...

    lasek, Nov 4, 2004, in forum: C Programming
    Replies:
    5
    Views:
    453
    dandelion
    Nov 4, 2004
  2. Daniel Folkes

    Python Nmap Scour sP script for linux

    Daniel Folkes, Nov 28, 2007, in forum: Python
    Replies:
    0
    Views:
    735
    Daniel Folkes
    Nov 28, 2007
  3. V Green
    Replies:
    0
    Views:
    923
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    1,034
    PA Bear [MS MVP]
    Feb 5, 2008
  5. Ara.T.Howard
    Replies:
    19
    Views:
    185
    Chad Perrin
    Mar 2, 2007
Loading...

Share This Page