Created
April 2, 2014 16:29
-
-
Save psav/9937631 to your computer and use it in GitHub Desktop.
IP Scraper, pipable ;)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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