-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlivelocationtracker.py
160 lines (136 loc) · 5.86 KB
/
livelocationtracker.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/usr/bin/python 3
# COADER : Luciferbigbrother
import os
try:
import requests
except:
os.system("pip install requests")
try:
import colorama
except:
os.system("pip install colorama")
try:
import pyfiglet
except:
os.system("pip install pyfiglet")
from colorama import *
auth = '1840e53e-0a8b-4d4d-b4e6-4d34d1033d91';
import time as t
t.sleep(2)
os.system("clear")
def loop():
head = pyfiglet.figlet_format("__")
os.system("clear")
print(Fore.GREEN + head)
print(Fore.GREEN + """
██╗ ██╗██╗ ██╗███████╗
██║ ██║██║ ██║██╔════╝
██║ ██║██║ ██║█████╗
██║ ██║╚██╗ ██╔╝██╔══╝
███████╗██║ ╚████╔╝ ███████╗
╚══════╝╚═╝ ╚═══╝ ╚══════╝ V1.03
┌┬┐┬─┐┌─┐┌─┐┬┌─┌─┐┬─┐
│ ├┬┘├─┤│ ├┴┐├┤ ├┬┘
┴ ┴└─┴ ┴└─┘┴ ┴└─┘┴└─
==============================================
[+]Author : Luciferbigbrother [+]
[+]GitHub : https://github.com/luciferbigbrother [+]""")
print(Fore.GREEN + """ ==============================================""")
# print("Usage:Iptracker [Ip address]\n\nExample:Iptracker our prsnal ip")
print(Fore.GREEN + """
Type \"show\" to show all command """)
def track():
tip = input(Fore.MAGENTA + "Lucifer > " + Style.RESET_ALL)
if tip == "help":
print(Fore.BLUE + """
show : Its Display all commands
iptracker : This is used for tracking an Ip address
help : Its display how to use this tool
exit : For quitting ip tracker
update: Its update Ip-Tracker automatically
""")
track()
elif tip == "show":
print(Fore.BLUE + """
This are the available commands
help
show
exit
iptracker
update
""")
track()
elif tip == "exit":
print(
Fore.YELLOW + "Thanks for using my tool\nIf you find any error,donot hestitate to message me on whatsapp")
exit()
elif tip == "iptracker":
print(Fore.GREEN + """________________________________Track Ip____________________________""")
print("""
""")
ip = (input(Fore.YELLOW + Back.RED + "Enter IP Address : " + Style.RESET_ALL + ""))
print(Fore.CYAN + " Fetching data from " + ip)
def get_location():
ip_address = ip
response = requests.get(f'https://ipapi.co/{ip_address}/json/').json()
location_data = {
"Ip Address": ip_address,
"city": response.get("city"),
"region": response.get("region"),
"country": response.get("country_name"),
"Ip Address Type": response.get("version"),
"Region Code": response.get("region_code"),
"Postal Code": response.get("postal"),
"Latitude": response.get(str("latitude")),
"Longitude": response.get(str("longitude")),
"TimeZone": response.get("timezone"),
"Country code": response.get("country_calling_code"),
"Currency": response.get("currency"),
"Currency Name": response.get("currency_name"),
"Languages": response.get("languages"),
"Country Area": response.get("country_area"),
"Population": response.get("country_population"),
"ASN": response.get("asn"),
"Organization": response.get("org")
}
latitude = response.get("latitude")
global lat
lat = str(latitude)
longitude = response.get("longitude")
global long
long = str(longitude)
global url
url = "https://google.com/maps/place/" + lat + "," + long + "/@" + lat + "," + long + ",16z"
return location_data
print(Fore.YELLOW, get_location())
print(Fore.YELLOW + "\nGoogle Maps: " + Fore.GREEN + url)
opn = "xdg-open " + url
map = input(Fore.CYAN + "\n\nDo you want to open location on google map? [yes/no]: " + Style.RESET_ALL)
if map == "yes" or map == "Yes":
os.system(opn)
elif tip == "update":
print(Fore.GREEN + "Updating Ip Tracker")
os.system("""
cd
rm -f -r Ip-Tracker
https://github.com/akashblackhat
""")
print(Fore.BLUE + """Now type the following command
cd $HOME
cd Ip-Tracker
python3 tracker.py
""")
exit()
else:
print(Fore.RED + "Invalid Command!")
t.sleep(3)
track()
track()
cont = input(
"\n\n" + Fore.YELLOW + Back.RED + "Would you like to track another IP address? [y/n] " + Style.RESET_ALL + " ")
if cont == "y" or cont == "Y":
loop()
else:
exit()
loop()
# HAPPY HACKING