Skip to content

Instantly share code, notes, and snippets.

@princebot
Last active August 26, 2016 19:36
Show Gist options
  • Save princebot/bb50b7e88b6eeca7b94fe002b73fa29b to your computer and use it in GitHub Desktop.
Save princebot/bb50b7e88b6eeca7b94fe002b73fa29b to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
"""
Open several browser tabs displaying information about an IP passed as a CLI arg.
(extremely quick, perversely dirty)
"""
from string import Template
import subprocess
import sys
chrome = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
base_urls = [
'http://www.plotip.com/ip/${ip}',
'https://www.virustotal.com/en/ip-address/${ip}/information/',
'http://www.ipvoid.com/scan/${ip}/',
'http://mxtoolbox.com/SuperTool.aspx?action=blacklist%3a${ip}&run=toolpage',
'http://www.tcpiputils.com/browse/ip-address/${ip}',
'https://www.shodan.io/host/${ip}',
'https://www.threatminer.org/host.php?q=${ip}',
'https://www.threatcrowd.org/ip.php?ip=${ip}',
'https://www.reverse.it/search?query=${ip}',
'https://www.passivetotal.org/register?query=${ip}',
'https://censys.io/ipv4/${ip}',
'http://pastebin.com/search?q=%22${ip}%22',
'https://cymon.io/${ip}',
'https://www.senderbase.org/lookup/?search_string=${ip}',
]
if len(sys.argv) < 2:
sys.exit("no arguments")
ip = sys.argv[1]
expanded_urls = []
for u in base_urls:
u = Template(u).substitute(ip=ip)
expanded_urls.append(u)
for u in expanded_urls:
subprocess.check_call([chrome, u])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment