-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheye.py
71 lines (56 loc) · 2.21 KB
/
eye.py
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
import ipinfo
import pprint
import socket
import whois
VER = "0.2"
def banner():
print('Welcome to: ')
logo = """
███████╗██╗ ██╗███████╗
██╔════╝╚██╗ ██╔╝██╔════╝
█████╗ ╚████╔╝ █████╗
██╔══╝ ╚██╔╝ ██╔══╝
███████╗ ██║ ███████╗
╚══════╝ ╚═╝ ╚══════╝
"""
#print(logo.format(VER,colored(getpass.getuser(), 'red', attrs=['bold'])))
print(logo)
#print('EYE is an Information Gathering Tool for Ethical Hackers')
def findLocation():
#API token from ipinfo
access_token = 'e5ec838e26c4c3'
handler = ipinfo.getHandler(access_token)
ip_address = input("Enter an IP to trace address (e.g:2409:4060:e82:6d43:a1fc:9657:82fe:43e9): ")
#ip_address = '2402:3a80:1968:eb17:1864:4daa:c856:8798'
#getting details of that particular IP
details = handler.getDetails(ip_address)
#displaying data
print('\n###### LOCATION FOR IP %s TRACKED SUCCESSFULLY ######' % (details.ip))
print('Country Code: %s' % (details.country))
print('Organisation Details: %s' % (details.org))
print('Country Name: %s' % (details.country_name))
print('TimeZone: %s' % (details.timezone))
print('Region : %s\n' % (details.region))
def reverseLookUp():
an_address = input("Enter an IP (e.g: 127.0.0.1): ")
domain_name = socket.gethostbyaddr(an_address)[0]
print(domain_name)
print()
def viewWebsiteData():
websiteName = input("Enter a website (e.g: www.google.com): ")
w = whois.whois(websiteName)
print(w.text)
print()
def driverFunction():
banner()
while(1):
choice = int(input('Press 1. to FIND LOCATION of an IP \nPress 2. to perform REVERSE DNS LOOKUP \nPress 3. to gather Website Information\nPress 4. to exit\n'))
if choice == 1:
findLocation()
elif choice == 2:
reverseLookUp()
elif choice == 3:
viewWebsiteData()
elif choice == 4:
return
driverFunction()