Skip to content

Instantly share code, notes, and snippets.

@psav
Created April 2, 2014 16:29
Show Gist options
  • Save psav/9937631 to your computer and use it in GitHub Desktop.
Save psav/9937631 to your computer and use it in GitHub Desktop.
IP Scraper, pipable ;)
import re
import sys
if __name__ == "__main__":
data = sys.stdin.read()
ips = set([b[0] for b in re.findall('((\d{1,3}\.){3}\d{1,3})', data)])
for ip in sorted(ips):
print ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment