Skip to content

Instantly share code, notes, and snippets.

@egcodes
Created September 25, 2014 18:35
Show Gist options
  • Save egcodes/dfcf310c4719a8c08b52 to your computer and use it in GitHub Desktop.
Save egcodes/dfcf310c4719a8c08b52 to your computer and use it in GitHub Desktop.
allIndexDownload.py
import urllib2
for a in range(1, 256):
for b in range(1, 256):
for c in range(1, 256):
for d in range(1, 256):
ip = "%d.%d.%d.%d"%(a,b,c,d)
buf = ""
print ip
try:
buf = urllib2.urlopen('http://'+ip, timeout=3).read()
except Exception, ex:
print ip, ex
if buf:
with open(ip, "w") as f:
f.write(buf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment