It looks like you're new here. If you want to get involved, click one of these buttons!
## pyScope 0.1
## Xinapse's Shodan, Exploit_DB, Metasploit Search Tool
from shodan import WebAPI
SHODAN_API_KEY = \"yourapikeyhere\"
api = WebAPI(SHODAN_API_KEY)
print 'pyScope by Xinapse'
print '1) Host Scan (Scan just one Server)'
print '2) Service Scan (Search for all servers running a service'
print '3) Search ExploitDB for a particular version'
choice = int(raw_input('What Scan would you like? '))
## Choice which scan
if choice == 1: ## Host Scan
print '1'
target = raw_input('Enter the target: ')
host = api.host(target)
print \"\"\"
IP: %s
Country: %s
City: %s
\"\"\" % (host['ip'], host.get('country', None), host.get('city', None))
# Print all banners
for item in host['data']:
print \"\"\"
Port: %s
Banner: %s
\"\"\" % (item['port'], item['banner'])
elif choice == 2: ## Service Scan
keyword = raw_input('Enter keyword: ')
try:
print (\"Searching...\")
results = api.search(keyword)
print results[\"total\"]
for result in results[\"matches\"]:
print result[\"ip\"]
print result[\"data\"]
print ''
except Exception, e:
print 'Error: %s' % e
elif choice == 3:
print '3'
else:
print 'Invalid Option'