seawolf2357 commited on
Commit
257dfc5
·
verified ·
1 Parent(s): 3b3a986

Deploy from GitHub repository

Browse files
Files changed (9) hide show
  1. GhostTR.py +315 -0
  2. README.md +9 -5
  3. app.py +137 -0
  4. asset/User.png +0 -0
  5. asset/bn.png +0 -0
  6. asset/ip.png +0 -0
  7. asset/phone.png +0 -0
  8. asset/text +1 -0
  9. requirements.txt +3 -0
GhostTR.py ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/python
2
+ # << CODE BY HUNX04
3
+ # << MAU RECODE ??? IZIN DULU LAH, MINIMAL TAG AKUN GITHUB MIMIN YANG MENGARAH KE AKUN INI, LEBIH GAMPANG SI PAKE FORK
4
+ # << KALAU DI ATAS TIDAK DI IKUTI MAKA AKAN MENDAPATKAN DOSA KARENA MIMIN GAK IKHLAS
5
+ # “Wahai orang-orang yang beriman! Janganlah kamu saling memakan harta sesamamu dengan jalan yang batil,” (QS. An Nisaa': 29). Rasulullah SAW juga melarang umatnya untuk mengambil hak orang lain tanpa izin.
6
+
7
+ # IMPORT MODULE
8
+
9
+ import json
10
+ import requests
11
+ import time
12
+ import os
13
+ import phonenumbers
14
+ from phonenumbers import carrier, geocoder, timezone
15
+ from sys import stderr
16
+
17
+ Bl = '\033[30m' # VARIABLE BUAT WARNA CUYY
18
+ Re = '\033[1;31m'
19
+ Gr = '\033[1;32m'
20
+ Ye = '\033[1;33m'
21
+ Blu = '\033[1;34m'
22
+ Mage = '\033[1;35m'
23
+ Cy = '\033[1;36m'
24
+ Wh = '\033[1;37m'
25
+
26
+
27
+ # utilities
28
+
29
+ # decorator for attaching run_banner to a function
30
+ def is_option(func):
31
+ def wrapper(*args, **kwargs):
32
+ run_banner()
33
+ func(*args, **kwargs)
34
+
35
+
36
+ return wrapper
37
+
38
+
39
+ # FUNCTIONS FOR MENU
40
+ @is_option
41
+ def IP_Track():
42
+ ip = input(f"{Wh}\n Enter IP target : {Gr}") # INPUT IP ADDRESS
43
+ print()
44
+ print(f' {Wh}============= {Gr}SHOW INFORMATION IP ADDRESS {Wh}=============')
45
+ req_api = requests.get(f"http://ipwho.is/{ip}") # API IPWHOIS.IS
46
+ ip_data = json.loads(req_api.text)
47
+ time.sleep(2)
48
+ print(f"{Wh}\n IP target :{Gr}", ip)
49
+ print(f"{Wh} Type IP :{Gr}", ip_data["type"])
50
+ print(f"{Wh} Country :{Gr}", ip_data["country"])
51
+ print(f"{Wh} Country Code :{Gr}", ip_data["country_code"])
52
+ print(f"{Wh} City :{Gr}", ip_data["city"])
53
+ print(f"{Wh} Continent :{Gr}", ip_data["continent"])
54
+ print(f"{Wh} Continent Code :{Gr}", ip_data["continent_code"])
55
+ print(f"{Wh} Region :{Gr}", ip_data["region"])
56
+ print(f"{Wh} Region Code :{Gr}", ip_data["region_code"])
57
+ print(f"{Wh} Latitude :{Gr}", ip_data["latitude"])
58
+ print(f"{Wh} Longitude :{Gr}", ip_data["longitude"])
59
+ lat = int(ip_data['latitude'])
60
+ lon = int(ip_data['longitude'])
61
+ print(f"{Wh} Maps :{Gr}", f"https://www.google.com/maps/@{lat},{lon},8z")
62
+ print(f"{Wh} EU :{Gr}", ip_data["is_eu"])
63
+ print(f"{Wh} Postal :{Gr}", ip_data["postal"])
64
+ print(f"{Wh} Calling Code :{Gr}", ip_data["calling_code"])
65
+ print(f"{Wh} Capital :{Gr}", ip_data["capital"])
66
+ print(f"{Wh} Borders :{Gr}", ip_data["borders"])
67
+ print(f"{Wh} Country Flag :{Gr}", ip_data["flag"]["emoji"])
68
+ print(f"{Wh} ASN :{Gr}", ip_data["connection"]["asn"])
69
+ print(f"{Wh} ORG :{Gr}", ip_data["connection"]["org"])
70
+ print(f"{Wh} ISP :{Gr}", ip_data["connection"]["isp"])
71
+ print(f"{Wh} Domain :{Gr}", ip_data["connection"]["domain"])
72
+ print(f"{Wh} ID :{Gr}", ip_data["timezone"]["id"])
73
+ print(f"{Wh} ABBR :{Gr}", ip_data["timezone"]["abbr"])
74
+ print(f"{Wh} DST :{Gr}", ip_data["timezone"]["is_dst"])
75
+ print(f"{Wh} Offset :{Gr}", ip_data["timezone"]["offset"])
76
+ print(f"{Wh} UTC :{Gr}", ip_data["timezone"]["utc"])
77
+ print(f"{Wh} Current Time :{Gr}", ip_data["timezone"]["current_time"])
78
+
79
+
80
+ @is_option
81
+ def phoneGW():
82
+ User_phone = input(
83
+ f"\n {Wh}Enter phone number target {Gr}Ex [+6281xxxxxxxxx] {Wh}: {Gr}") # INPUT NUMBER PHONE
84
+ default_region = "ID" # DEFAULT NEGARA INDONESIA
85
+
86
+ parsed_number = phonenumbers.parse(User_phone, default_region) # VARIABLE PHONENUMBERS
87
+ region_code = phonenumbers.region_code_for_number(parsed_number)
88
+ jenis_provider = carrier.name_for_number(parsed_number, "en")
89
+ location = geocoder.description_for_number(parsed_number, "id")
90
+ is_valid_number = phonenumbers.is_valid_number(parsed_number)
91
+ is_possible_number = phonenumbers.is_possible_number(parsed_number)
92
+ formatted_number = phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.INTERNATIONAL)
93
+ formatted_number_for_mobile = phonenumbers.format_number_for_mobile_dialing(parsed_number, default_region,
94
+ with_formatting=True)
95
+ number_type = phonenumbers.number_type(parsed_number)
96
+ timezone1 = timezone.time_zones_for_number(parsed_number)
97
+ timezoneF = ', '.join(timezone1)
98
+
99
+ print(f"\n {Wh}========== {Gr}SHOW INFORMATION PHONE NUMBERS {Wh}==========")
100
+ print(f"\n {Wh}Location :{Gr} {location}")
101
+ print(f" {Wh}Region Code :{Gr} {region_code}")
102
+ print(f" {Wh}Timezone :{Gr} {timezoneF}")
103
+ print(f" {Wh}Operator :{Gr} {jenis_provider}")
104
+ print(f" {Wh}Valid number :{Gr} {is_valid_number}")
105
+ print(f" {Wh}Possible number :{Gr} {is_possible_number}")
106
+ print(f" {Wh}International format :{Gr} {formatted_number}")
107
+ print(f" {Wh}Mobile format :{Gr} {formatted_number_for_mobile}")
108
+ print(f" {Wh}Original number :{Gr} {parsed_number.national_number}")
109
+ print(
110
+ f" {Wh}E.164 format :{Gr} {phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.E164)}")
111
+ print(f" {Wh}Country code :{Gr} {parsed_number.country_code}")
112
+ print(f" {Wh}Local number :{Gr} {parsed_number.national_number}")
113
+ if number_type == phonenumbers.PhoneNumberType.MOBILE:
114
+ print(f" {Wh}Type :{Gr} This is a mobile number")
115
+ elif number_type == phonenumbers.PhoneNumberType.FIXED_LINE:
116
+ print(f" {Wh}Type :{Gr} This is a fixed-line number")
117
+ else:
118
+ print(f" {Wh}Type :{Gr} This is another type of number")
119
+
120
+
121
+ @is_option
122
+ def TrackLu():
123
+ try:
124
+ username = input(f"\n {Wh}Enter Username : {Gr}")
125
+ results = {}
126
+ social_media = [
127
+ {"url": "https://www.facebook.com/{}", "name": "Facebook"},
128
+ {"url": "https://www.twitter.com/{}", "name": "Twitter"},
129
+ {"url": "https://www.instagram.com/{}", "name": "Instagram"},
130
+ {"url": "https://www.linkedin.com/in/{}", "name": "LinkedIn"},
131
+ {"url": "https://www.github.com/{}", "name": "GitHub"},
132
+ {"url": "https://www.pinterest.com/{}", "name": "Pinterest"},
133
+ {"url": "https://www.tumblr.com/{}", "name": "Tumblr"},
134
+ {"url": "https://www.youtube.com/{}", "name": "Youtube"},
135
+ {"url": "https://soundcloud.com/{}", "name": "SoundCloud"},
136
+ {"url": "https://www.snapchat.com/add/{}", "name": "Snapchat"},
137
+ {"url": "https://www.tiktok.com/@{}", "name": "TikTok"},
138
+ {"url": "https://www.behance.net/{}", "name": "Behance"},
139
+ {"url": "https://www.medium.com/@{}", "name": "Medium"},
140
+ {"url": "https://www.quora.com/profile/{}", "name": "Quora"},
141
+ {"url": "https://www.flickr.com/people/{}", "name": "Flickr"},
142
+ {"url": "https://www.periscope.tv/{}", "name": "Periscope"},
143
+ {"url": "https://www.twitch.tv/{}", "name": "Twitch"},
144
+ {"url": "https://www.dribbble.com/{}", "name": "Dribbble"},
145
+ {"url": "https://www.stumbleupon.com/stumbler/{}", "name": "StumbleUpon"},
146
+ {"url": "https://www.ello.co/{}", "name": "Ello"},
147
+ {"url": "https://www.producthunt.com/@{}", "name": "Product Hunt"},
148
+ {"url": "https://www.snapchat.com/add/{}", "name": "Snapchat"},
149
+ {"url": "https://www.telegram.me/{}", "name": "Telegram"},
150
+ {"url": "https://www.weheartit.com/{}", "name": "We Heart It"}
151
+ ]
152
+ for site in social_media:
153
+ url = site['url'].format(username)
154
+ response = requests.get(url)
155
+ if response.status_code == 200:
156
+ results[site['name']] = url
157
+ else:
158
+ results[site['name']] = (f"{Ye}Username not found {Ye}!")
159
+ except Exception as e:
160
+ print(f"{Re}Error : {e}")
161
+ return
162
+
163
+ print(f"\n {Wh}========== {Gr}SHOW INFORMATION USERNAME {Wh}==========")
164
+ print()
165
+ for site, url in results.items():
166
+ print(f" {Wh}[ {Gr}+ {Wh}] {site} : {Gr}{url}")
167
+
168
+
169
+ @is_option
170
+ def showIP():
171
+ respone = requests.get('https://api.ipify.org/')
172
+ Show_IP = respone.text
173
+
174
+ print(f"\n {Wh}========== {Gr}SHOW INFORMATION YOUR IP {Wh}==========")
175
+ print(f"\n {Wh}[{Gr} + {Wh}] Your IP Adrress : {Gr}{Show_IP}")
176
+ print(f"\n {Wh}==============================================")
177
+
178
+
179
+ # OPTIONS
180
+ options = [
181
+ {
182
+ 'num': 1,
183
+ 'text': 'IP Tracker',
184
+ 'func': IP_Track
185
+ },
186
+ {
187
+ 'num': 2,
188
+ 'text': 'Show Your IP',
189
+ 'func': showIP
190
+
191
+ },
192
+ {
193
+ 'num': 3,
194
+ 'text': 'Phone Number Tracker',
195
+ 'func': phoneGW
196
+ },
197
+ {
198
+ 'num': 4,
199
+ 'text': 'Username Tracker',
200
+ 'func': TrackLu
201
+ },
202
+ {
203
+ 'num': 0,
204
+ 'text': 'Exit',
205
+ 'func': exit
206
+ }
207
+ ]
208
+
209
+
210
+ def clear():
211
+ # for windows
212
+ if os.name == 'nt':
213
+ _ = os.system('cls')
214
+ # for mac and linux
215
+ else:
216
+ _ = os.system('clear')
217
+
218
+
219
+ def call_option(opt):
220
+ if not is_in_options(opt):
221
+ raise ValueError('Option not found')
222
+ for option in options:
223
+ if option['num'] == opt:
224
+ if 'func' in option:
225
+ option['func']()
226
+ else:
227
+ print('No function detected')
228
+
229
+
230
+ def execute_option(opt):
231
+ try:
232
+ call_option(opt)
233
+ input(f'\n{Wh}[ {Gr}+ {Wh}] {Gr}Press enter to continue')
234
+ main()
235
+ except ValueError as e:
236
+ print(e)
237
+ time.sleep(2)
238
+ execute_option(opt)
239
+ except KeyboardInterrupt:
240
+ print(f'\n{Wh}[ {Re}! {Wh}] {Re}Exit')
241
+ time.sleep(2)
242
+ exit()
243
+
244
+
245
+ def option_text():
246
+ text = ''
247
+ for opt in options:
248
+ text += f'{Wh}[ {opt["num"]} ] {Gr}{opt["text"]}\n'
249
+ return text
250
+
251
+
252
+ def is_in_options(num):
253
+ for opt in options:
254
+ if opt['num'] == num:
255
+ return True
256
+ return False
257
+
258
+
259
+ def option():
260
+ # BANNER TOOLS
261
+ clear()
262
+ stderr.writelines(f"""
263
+ ________ __ ______ __
264
+ / ____/ /_ ____ _____/ /_ /_ __/________ ______/ /__
265
+ / / __/ __ \/ __ \/ ___/ __/_____/ / / ___/ __ `/ ___/ //_/
266
+ / /_/ / / / / /_/ (__ ) /_/_____/ / / / / /_/ / /__/ ,<
267
+ \____/_/ /_/\____/____/\__/ /_/ /_/ \__,_/\___/_/|_|
268
+
269
+ {Wh}[ + ] C O D E B Y H U N X [ + ]
270
+ """)
271
+
272
+ stderr.writelines(f"\n\n\n{option_text()}")
273
+
274
+
275
+ def run_banner():
276
+ clear()
277
+ time.sleep(1)
278
+ stderr.writelines(f"""{Wh}
279
+ .-.
280
+ .' `. {Wh}--------------------------------
281
+ :g g : {Wh}| {Gr}GHOST - TRACKER - IP ADDRESS {Wh}|
282
+ : o `. {Wh}| {Gr}@CODE BY HUNXBYTS {Wh}|
283
+ : ``. {Wh}--------------------------------
284
+ : `.
285
+ : : . `.
286
+ : : ` . `.
287
+ `.. : `. ``;
288
+ `:; `:'
289
+ : `.
290
+ `. `. .
291
+ `'`'`'`---..,___`;.-'
292
+ """)
293
+ time.sleep(0.5)
294
+
295
+
296
+ def main():
297
+ clear()
298
+ option()
299
+ time.sleep(1)
300
+ try:
301
+ opt = int(input(f"{Wh}\n [ + ] {Gr}Select Option : {Wh}"))
302
+ execute_option(opt)
303
+ except ValueError:
304
+ print(f'\n{Wh}[ {Re}! {Wh}] {Re}Please input number')
305
+ time.sleep(2)
306
+ main()
307
+
308
+
309
+ if __name__ == '__main__':
310
+ try:
311
+ main()
312
+ except KeyboardInterrupt:
313
+ print(f'\n{Wh}[ {Re}! {Wh}] {Re}Exit')
314
+ time.sleep(2)
315
+ exit()
README.md CHANGED
@@ -1,12 +1,16 @@
1
  ---
2
  title: Ghosttrack
3
- emoji: 👁
4
- colorFrom: gray
5
- colorTo: purple
6
  sdk: gradio
7
- sdk_version: 5.44.1
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
1
  ---
2
  title: Ghosttrack
3
+ emoji: 🚀
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: gradio
7
+ sdk_version: "5.35.0"
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
+ # Ghosttrack
13
+
14
+ Useful tool to track location or mobile number, so this tool can be called osint or also information gathering
15
+
16
+ Deployed from: https://github.com/seawolf2357/GhostTrack
app.py ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import requests
3
+ import phonenumbers
4
+ from phonenumbers import geocoder, carrier, timezone
5
+ import json
6
+
7
+ def track_ip(ip_address):
8
+ try:
9
+ response = requests.get(f"http://ip-api.com/json/{ip_address}")
10
+ data = response.json()
11
+
12
+ if data['status'] == 'success':
13
+ result = f"""IP Tracking Results:
14
+ Country: {data['country']}
15
+ Region: {data['regionName']}
16
+ City: {data['city']}
17
+ ZIP: {data['zip']}
18
+ Latitude: {data['lat']}
19
+ Longitude: {data['lon']}
20
+ ISP: {data['isp']}
21
+ Organization: {data['org']}
22
+ AS: {data['as']}"""
23
+ return result
24
+ else:
25
+ return "Error: Invalid IP address or tracking failed."
26
+ except Exception as e:
27
+ return f"Error: {str(e)}"
28
+
29
+ def track_phone(phone_number):
30
+ try:
31
+ # Parse the phone number
32
+ parsed_number = phonenumbers.parse(phone_number, None)
33
+
34
+ # Validate the phone number
35
+ if not phonenumbers.is_valid_number(parsed_number):
36
+ return "Error: Invalid phone number."
37
+
38
+ # Get location
39
+ location = geocoder.description_for_number(parsed_number, "en")
40
+
41
+ # Get carrier
42
+ carrier_name = carrier.name_for_number(parsed_number, "en")
43
+
44
+ # Get timezone
45
+ timezones = timezone.time_zones_for_number(parsed_number)
46
+
47
+ # Check if number is valid
48
+ is_valid = phonenumbers.is_valid_number(parsed_number)
49
+
50
+ # Check if number is possible
51
+ is_possible = phonenumbers.is_possible_number(parsed_number)
52
+
53
+ result = f"""Phone Tracking Results:
54
+ Number: {phone_number}
55
+ Valid: {is_valid}
56
+ Possible: {is_possible}
57
+ Location: {location}
58
+ Carrier: {carrier_name}
59
+ Timezones: {', '.join(timezones)}"""
60
+
61
+ return result
62
+ except Exception as e:
63
+ return f"Error: {str(e)}"
64
+
65
+ def track_username(username):
66
+ try:
67
+ # List of social media platforms to check
68
+ platforms = {
69
+ "GitHub": f"https://github.com/{username}",
70
+ "Twitter": f"https://twitter.com/{username}",
71
+ "Instagram": f"https://instagram.com/{username}",
72
+ "Reddit": f"https://reddit.com/user/{username}",
73
+ "Facebook": f"https://facebook.com/{username}",
74
+ }
75
+
76
+ results = []
77
+ for platform, url in platforms.items():
78
+ try:
79
+ response = requests.get(url, timeout=5)
80
+ if response.status_code == 200:
81
+ results.append(f"{platform}: Found - {url}")
82
+ else:
83
+ results.append(f"{platform}: Not Found")
84
+ except:
85
+ results.append(f"{platform}: Not Found")
86
+
87
+ return "\n".join(results)
88
+ except Exception as e:
89
+ return f"Error: {str(e)}"
90
+
91
+ with gr.Blocks(title="GhostTrack - OSINT Tool") as demo:
92
+ gr.Markdown("""
93
+ # GhostTrack - OSINT Information Gathering Tool
94
+
95
+ Useful tool to track location or mobile number. This tool can be used for OSINT (Open Source Intelligence) and information gathering.
96
+ """)
97
+
98
+ with gr.Tab("IP Tracker"):
99
+ gr.Markdown("""
100
+ ### IP Address Tracker
101
+
102
+ Enter an IP address to get geolocation and ISP information.
103
+ """)
104
+ ip_input = gr.Textbox(label="IP Address", placeholder="Enter IP address (e.g., 8.8.8.8)")
105
+ ip_output = gr.Textbox(label="Tracking Results", lines=12)
106
+ ip_button = gr.Button("Track IP")
107
+ ip_button.click(fn=track_ip, inputs=ip_input, outputs=ip_output)
108
+
109
+ with gr.Tab("Phone Tracker"):
110
+ gr.Markdown("""
111
+ ### Phone Number Tracker
112
+
113
+ Enter a phone number with country code to get location and carrier information.
114
+ """)
115
+ phone_input = gr.Textbox(label="Phone Number", placeholder="Enter phone number with country code (e.g., +1234567890)")
116
+ phone_output = gr.Textbox(label="Tracking Results", lines=12)
117
+ phone_button = gr.Button("Track Phone")
118
+ phone_button.click(fn=track_phone, inputs=phone_input, outputs=phone_output)
119
+
120
+ with gr.Tab("Username Tracker"):
121
+ gr.Markdown("""
122
+ ### Username Tracker
123
+
124
+ Enter a username to check its presence on various social media platforms.
125
+ """)
126
+ username_input = gr.Textbox(label="Username", placeholder="Enter username (e.g., johnsmith)")
127
+ username_output = gr.Textbox(label="Tracking Results", lines=12)
128
+ username_button = gr.Button("Track Username")
129
+ username_button.click(fn=track_username, inputs=username_input, outputs=username_output)
130
+
131
+ gr.Markdown("""
132
+ ---
133
+ **Note:** This tool is for educational purposes only. Please use responsibly and ethically.
134
+ """)
135
+
136
+ if __name__ == "__main__":
137
+ demo.launch()
asset/User.png ADDED
asset/bn.png ADDED
asset/ip.png ADDED
asset/phone.png ADDED
asset/text ADDED
@@ -0,0 +1 @@
 
 
1
+ Image..
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio>=5.35.0
2
+ phonenumbers
3
+ requests