Created
July 30, 2014 15:30
-
-
Save anonymous/1c5c9328acb8b686f155 to your computer and use it in GitHub Desktop.
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
#!/bin/sh -e | |
# https://collector.torproject.org/archive/relay-descriptors/server-descriptors/server-descriptors-YYYY-MM.tar.xz | |
tar xvJf "$1" | |
basename=`basename "$1" .tar.xz` | |
grep -lr '^router Unnamed (50\.7|204\.45)\.' "$basename" | | |
xargs grep -l '^platform Tor 0\.2\.4\.18-rc' > "$basename.descriptors" | |
xargs grep -h '^fingerprint ' < "$basename.descriptors" | | |
cut -d ' ' -f 2- | tr -d ' ' | | |
sort -u > "$basename.fingerprints" | |
xargs grep -h '^router ' < "$basename.descriptors" | | |
cut -d ' ' -f 3 | | |
sort -u > "$basename.ipaddresses" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment