-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathipcounter.py
More file actions
106 lines (82 loc) · 2.86 KB
/
ipcounter.py
File metadata and controls
106 lines (82 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#!/usr/bin/python
# coding=utf-8
# Author github.com/Eltotiz
import os
from colorama import Fore, init, Style
import fade
from shodan import Shodan
import json
import requests
import time
def clear():
if os.name == "posix":
os.system ("clear")
elif os.name == ("ce", "nt", "dos"):
os.system ("cls")
banner = """ ________ ______ __
/ _/ __ \ / ____/___ __ ______ / /____ _____
/ // /_/ / / / / __ \/ / / / __ \/ __/ _ \/ ___/
_/ // ____/ / /___/ /_/ / /_/ / / / / /_/ __/ /
/___/_/ \____/\____/\__,_/_/ /_/\__/\___/_/
"""
# PLACE YOUR SHODAN KEY
# PLACE YOUR SHODAN KEY
# PLACE YOUR SHODAN KEY
# PLACE YOUR SHODAN KEY
api = Shodan('PLACE YOUR SHODAN KEY HERE')
clear()
print("")
faded_text = fade.purplepink(banner)
print(faded_text)
print(Fore.GREEN + " Created by github/eltotiz")
print("")
IP = input(" Insert the IP > ")
print("")
print(" [+] Connecting to the API ...")
api2 = f"""http://ip-api.com/json/{IP}"""
shodanIP = api.host(IP)
data = requests.get(api2).json()
clear()
print("")
faded_text = fade.purplepink(banner)
print(faded_text)
domain = format(shodanIP.get('hostnames'))
chars = ['[', ']', "'"]
res = domain.translate(str.maketrans('', '', ''.join(chars)))
ports = format(shodanIP.get('ports'))
chars = ['[', ']', "'"]
portstext = ports.translate(str.maketrans('', '', ''.join(chars)))
print(Fore.GREEN + " Created by github/eltotiz")
print("")
print("")
print(" ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ IP INFORMATION ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ")
print("")
print(' [!] IP Address: ', data['query'])
print(' [!] Status: ', data['status'])
print(' [!] Country: ', data['country'])
print(' [!] Country Code: ', data['countryCode'])
print(' [!] Region: ', data['region'])
print(' [!] Region Name: ', data['regionName'])
print(' [!] City: {}'. format(shodanIP.get('city')))
print(' [!] Zip: ', data['zip'])
print(' [!] Latitude: ', data['lat'])
print(' [!] Loginth', data['lon'])
print(' [!] Time zone: ', data['timezone'])
print(' [!] IPS: ', data['isp'])
print(f" [!] Domains: {res}")
print(' [!] Organization: ', data['org'])
print(' [!] AS: ', data['as'])
print(f' [!] Ports: {portstext}')
print("")
print(" ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄")
print("")
print("")
print(" ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ POSSIBLE EXPLOITS ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄")
print("")
vulns = format(shodanIP.get('vulns', ' N/A'))
chars = ['[', ']', "'"]
vulnstext = vulns.translate(str.maketrans('', '', ''.join(chars)))
print(f' {vulnstext}')
print("")
print(" ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄")
# Hello! :)