forked from b4rc0d37/IP-GEO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ip-geo.py
68 lines (60 loc) · 1.91 KB
/
ip-geo.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
#!/data/data/com.termux/files/bin/python
# Importing Modules \(o,,,o)/
import argparse
import requests, json
import sys
from sys import argv
import os
# Arguments *_*
parser = argparse.ArgumentParser()
parser.add_argument("-t", help="Ip objetivo", type=str, dest='target', required=True)
args = parser.parse_args()
# I love Colors !
lightblue = '\033[94m'
lightgreen = '\033[92m'
clear = '\033[0m'
boldblue = '\033[01m''\033[94m'
cyan = '\033[36m'
bold = '\033[01m'
red = '\033[31m'
lightcyan = '\033[96m'
yellow = '\033[93m'
# Clear The Terminal
os.system('clear')
# Banner
print(bold+cyan+"""
▗▄▄ ▗▄▄ ▗▄ ▗▄▄▖ ▄▄
▐ ▐ ▝▌ ▗▘ ▘▐ ▗▘▝▖
▐ ▐▄▟▘ ▐ ▗▖▐▄▄▖▐ ▌
▐ ▐ ▀▘ ▐ ▌▐ ▐ ▌
▗▟▄ ▐ ▚▄▘▐▄▄▖ ▙▟
"""+clear)
print(lightcyan+bold+"[ Creador By: B4rc0d37 ] | https://www.youtube.com/c/TutorialesHackingEtico[\n"+clear)
ip = args.target
# Let's Begin
api = "http://ip-api.com/json/"
# Sending Requests And Getting Data
try:
data = requests.get(api+ip).json()
sys.stdout.flush()
a = yellow+bold+"[~]"
# Printing,Not Phising ; P
print(a, "Target:", data['query'])
print(a, "ISP:", data['isp'])
print(a, "Organisation:", data['org'])
print(a, "City:", data['city'])
print(a, "Region:", data['region'])
print(a, "Region name:", data['regionName'])
print(a, "Latitude:", data['lat'])
print(a, "Longitude:", data['lon'])
print(a, "Timezone:", data['timezone'])
print(a, "Zip code:", data['zip'])
print(" "+clear)
# Error Handling
except KeyboardInterrupt:
print('Exiting,Good Bye'+clear)
sys.exit(0)
except requests.exceptions.ConnectionError as e:
print(red+bold+"[!]"+" Por favor conectate a internet para usar este script!"+clear)
sys.exit(1)
# Done!