-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathip.py
More file actions
128 lines (122 loc) · 5.21 KB
/
ip.py
File metadata and controls
128 lines (122 loc) · 5.21 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/usr/bin/env python
#-*- coding: utf-8 -*-
'''
IP Tracking - Tools Termux
This project was created by Dfv47 with Black Codet Crush.
Copyright 2k19 @m_d4fv
'''
#color
A='\033[1;30m'
W='\033[1;37m'
N='\033[0m'
R='\033[31m'
G='\033[1;32m'
B='\033[34m'
Y='\033[1;33m'
try:
import requests,json,os,urllib,sys,time,readline,rlcompleter
except Exception as F:
exit("[ModuleErr] %s"%(F))
if sys.version[0] in '2':
exit(R+" [Sorry] use python version 3")
def main():
print (G+"\t ___ _____ _ _ ")
print (G+"\t | | ___ |_ _| ___ ___ ___ | |_ |_| ___ ___ ")
print (G+"\t |- -|| . | | | | _|| .'|| _|| '_|| || || . |")
print (G+"\t |___|| _| |_| |_| |__,||___||_,_||_||_|_||_ |")
print (G+"\t |_| "+R+"@"+W+"Dfv47 "+R+"@"+W+"BlackCoderCrush"+G+" |___| ")
print (W+"\n\t 1"+G+"]"+W+" Check my IP adress.")
print (W+"\t 2"+G+"]"+W+" Tracking location IP adress.\n")
pilih = input(R+' ┌─'+B+'['+R+'Ip-Tracking'+A+'@'+G+'Dfv47'+B+']'+R+'-'+B+'['+G+'BlackCoderCrush'+B+']\n '+R+'└─────'+Y+'▶'+W+' # ')
if "1" in pilih:
print (W+"\n ["+G+"*"+W+"] Checking your public IP")
print (W+" ["+G+"+"+W+"] Your public IP : "+G+requests.get('http://ip-api.com/json/').json()["query"])
print (W+" ["+G+"#"+W+"] Finished.")
input(W+" ["+G+"?"+W+"] Press enter to menu")
os.system('clear')
main()
elif "2" in pilih:
print (W+"\n ["+G+"*"+W+"] Dump Location From Public IP")
print (W+" 1"+G+"]"+W+" Manual")
print (W+" 2"+G+"]"+W+" Massal\n")
t=input(W+' ['+G+'?'+W+'] Choose : ')
if "1" in t:
ip=input(W+' ['+G+'#'+W+'] IP : ')
print (W+" ["+G+"*"+W+"] Tracking IP : "+G+ip+"")
rk=requests.get('http://ipapi.co/'+ip+'/json/')
r=json.loads(rk.text)
try:
print (W+"\n ["+G+"+"+W+"] IP\t\t:"+G+"",r["ip"])
print (W+" ["+G+"+"+W+"] City\t\t:"+G+"",r["city"])
print (W+" ["+G+"+"+W+"] Region Code\t:"+G+"",r["region_code"])
print (W+" ["+G+"+"+W+"] Country\t\t:"+G+"",r["country"])
print (W+" ["+G+"+"+W+"] Country Name\t:"+G+"",r["country_name"])
print (W+" ["+G+"+"+W+"] Region\t\t:"+G+"",r["region"])
print (W+" ["+G+"+"+W+"] Lang\t\t:"+G+"",r["languages"])
print (W+" ["+G+"+"+W+"] Calling Code\t:"+G+"",r["country_calling_code"])
print (W+" ["+G+"+"+W+"] Utc Offset\t:"+G+"",r["utc_offset"])
print (W+" ["+G+"+"+W+"] Continent Code\t:"+G+"",r["continent_code"])
print (W+" ["+G+"+"+W+"] Currency\t\t:"+G+"",r["currency"])
print (W+" ["+G+"+"+W+"] Latitude\t\t:"+G+"",r["latitude"])
print (W+" ["+G+"+"+W+"] Longitude\t\t:"+G+"",r["longitude"])
print (W+" ["+G+"+"+W+"] Timezone\t\t:"+G+"",r["timezone"])
print (W+" ["+G+"+"+W+"] Postal\t\t:"+G+"",r["postal"])
print (W+" ["+G+"+"+W+"] In Eu\t\t:"+G+"",r["in_eu"])
print (W+"\n ["+G+"#"+W+"] Finished")
input(W+" ["+G+"?"+W+"] Press enter to menu")
os.system('clear')
main()
except:
print (W+" ["+R+"-"+W+"] IP\t\t: "+R+"Unkwon")
print (W+"\n ["+G+"#"+W+"] Finished")
input(W+" ["+G+"?"+W+"] Press enter to menu")
os.system('clear')
main()
elif "2" in t:
ip=input(W+' ['+G+'#'+W+'] IP List : ')
try:
vk=open(ip).readlines()
vko=len(vk)
vki=open(ip)
for k in range(vko):
word=vki.readline().replace('\n','')
rk=requests.get('http://ipapi.co/'+word+'/json/')
r=json.loads(rk.text)
try:
print (W+"\n ["+G+"*"+W+"] Tracking IP "+W+R+word+"")
print (W+"\n ["+G+"+"+W+"] IP\t\t:"+G+"",r["ip"])
print (W+" ["+G+"+"+W+"] City\t\t:"+G+"",r["city"])
print (W+" ["+G+"+"+W+"] Region Code\t:"+G+"",r["region_code"])
print (W+" ["+G+"+"+W+"] Country\t\t:"+G+"",r["country"])
print (W+" ["+G+"+"+W+"] Country Name\t:"+G+"",r["country_name"])
print (W+" ["+G+"+"+W+"] Region\t\t:"+G+"",r["region"])
print (W+" ["+G+"+"+W+"] Lang\t\t:"+G+"",r["languages"])
print (W+" ["+G+"+"+W+"] Calling Code\t:"+G+"",r["country_calling_code"])
print (W+" ["+G+"+"+W+"] Utc Offset\t:"+G+"",r["utc_offset"])
print (W+" ["+G+"+"+W+"] Continent Code\t:"+G+"",r["continent_code"])
print (W+" ["+G+"+"+W+"] Currency\t\t:"+G+"",r["currency"])
print (W+" ["+G+"+"+W+"] Latitude\t\t:"+G+"",r["latitude"])
print (W+" ["+G+"+"+W+"] Longitude\t\t:"+G+"",r["longitude"])
print (W+" ["+G+"+"+W+"] Timezone\t\t:"+G+"",r["timezone"])
print (W+" ["+G+"+"+W+"] Postal\t\t:"+G+"",r["postal"])
print (W+" ["+G+"+"+W+"] In Eu\t\t:"+G+"",r["in_eu"])
except:
print (W+" ["+R+"-"+W+"] IP\t\t: "+R+"Unknown")
print (W+"\n ["+G+"#"+W+"] Finished")
input(W+" ["+G+"?"+W+"] Press enter to menu")
os.system('clear')
main()
except:
print (W+"\n ["+R+"-"+W+"] List "+R+"'"+ip+"'"+W+" Not Found")
print (W+" ["+R+"-"+W+"] Please edit list (nano list.txt) and input your IP")
input(W+" ["+G+"?"+W+"] Press enter to menu")
os.system('clear')
main()
else:
print (W+"\n ["+R+"-"+W+"] Wrong Input !!!")
time.sleep(2)
os.system('clear')
main()
if __name__ == "__main__":
os.system('clear')
main()