Created
April 20, 2012 23:24
-
-
Save JacobHacker/2432624 to your computer and use it in GitHub Desktop.
grab & grep blocked ip proxies from wikipedia
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
# First, download the last 1000 blocked users blocked by ProcseeBot | |
wget -O proxyLog.html 'http://en.wikipedia.org/w/index.php?title=Special:Log&limit=1000&type=block&user=ProcseeBot' | |
# Extract all ip addresses matching the regex. Because the IP is listed multiple times, sort with the unique | |
# option, and output to iplist | |
cat proxyLog.html | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'|sort -u>iplist | |
# Scan for open port 8080, and output to scan.xml | |
nmap -Pn -n -iL iplist -p 8080 -oX scan.xml | |
# Extract the results with the same regex used on the log. | |
cat scan.xml|grep open -B 3|grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'>open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment