salawank

http_ip.py

Aug 5th, 2013
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python -tt
  2.  
  3. import re
  4. import urllib2
  5.  
  6.  
  7. response = urllib2.urlopen('http://isc.sans.edu/reports.html')
  8. html = response.read()
  9.  
  10.  
  11. ip_raw = re.findall(r'(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)', html)
  12.  
  13. ip = '\n'.join(sorted(set(ip_raw)))
  14. print ip
RAW Paste Data