Skip to content

Instantly share code, notes, and snippets.

@AlexLynd
Last active September 24, 2021 13:14
Show Gist options
  • Save AlexLynd/d4c9d23db1c76fd0138b0cb7c5c87dbd to your computer and use it in GitHub Desktop.
Save AlexLynd/d4c9d23db1c76fd0138b0cb7c5c87dbd to your computer and use it in GitHub Desktop.
Python Shodan utility [GCI 2019-20]
from os import system
system("clear")
while True :
print("1. What's my IP")
print("2. Scanning host")
print("3. Shodan search to scan ip, port, hostname")
print("0. Exit\n")
option = input("SHODAN>")
system("clear")
if option == "0":
break
elif option == "1":
system("shodan myip")
elif option == "2":
ip = input("ip: ")
system("shodan host "+ip)
elif option == "3":
search= input("search to query: ")
system("shodan search --fields ip_str,port,org,hostnames "+search)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment