Forum Thread: How to Build a Network Crawling Python Program?

Okay I am trying to learn how to build a Python program to crawl a network and out-put ip addresses and mac addresses to a text file on the device running it. I am looking at running this from a phone and laptop. Any help would be great.


2 Responses

Start by checking out the Scapy page, and add a simple loop feature. Something like:

for i in range (1..254):
ans, unans= scapy(Craft ARP packet)
if not ans:
print "No clients found"
with f as open('File.txt', 'a'):
except: IOError as e,
print (str(e))

I cant remember if this will exclude the MAC address as I was scripting this for a different purpose where the MAC was not necessary.

Hope this helps.

Thanks I am working with another tech here at our office and we are both new to Python.

Share Your Thoughts

  • Hot
  • Active