· 5 years ago · Aug 12, 2020, 07:08 AM
1#// IMPORTANT~Please set your api key in the "key" variable before attempting
2# to use this.
3
4#// USAGE: run it and type in anything you'd put in shodan. or just like
5# "router", "ireland, etc (for scanning bullshit; whatever.)
6
7import os
8import shodan
9
10banner = ("""
11 ██████ ▄████▄ ██▀███ ▄▄▄ ██▓███ ▓█████ ██▀███
12▒██ ▒ ▒██▀ ▀█ ▓██ ▒ ██▒▒████▄ ▓██░ ██▒▓█ ▀ ▓██ ▒ ██▒
13░ ▓██▄ ▒▓█ ▄ ▓██ ░▄█ ▒▒██ ▀█▄ ▓██░ ██▓▒▒███ ▓██ ░▄█ ▒
14 ▒ ██▒▒▓▓▄ ▄██▒▒██▀▀█▄ ░██▄▄▄▄██ ▒██▄█▓▒ ▒▒▓█ ▄ ▒██▀▀█▄
15▒██████▒▒▒ ▓███▀ ░░██▓ ▒██▒ ▓█ ▓██▒▒██▒ ░ ░░▒████▒░██▓ ▒██▒
16▒ ▒▓▒ ▒ ░░ ░▒ ▒ ░░ ▒▓ ░▒▓░ ▒▒ ▓▒█░▒▓▒░ ░ ░░░ ▒░ ░░ ▒▓ ░▒▓░
17░ ░▒ ░ ░ ░ ▒ ░▒ ░ ▒░ ▒ ▒▒ ░░▒ ░ ░ ░ ░ ░▒ ░ ▒░
18░ ░ ░ ░ ░░ ░ ░ ▒ ░░ ░ ░░ ░
19 ░ ░ ░ ░ ░ ░ ░ ░ ░
20 ░
21\033[4mShodan Scraper ~ xzec <3 | v1.2
22
23""")
24
25key = ""
26api = shodan.Shodan(key)
27
28os.system("clear")
29print("\033[31m"+ banner)
30input = input("Scrape that bitch!\033[5m#~:\033[0m ")
31
32def main():
33 os.system("clear")
34 print("\033[34;4mScraping <3")
35 results = api.search(input)
36 print("Results found: {}".format(results["total"]))
37 for result in results['matches']:
38 print('{}'.format(result['ip_str']))
39main()