mirror of
https://github.com/HunxByts/GhostTrack.git
synced 2026-09-20 11:33:33 +08:00
Reworked the entire scripts for future code expansion. Retain old functionality
This commit is contained in:
298
GhostTR.py
298
GhostTR.py
@@ -14,7 +14,6 @@ import phonenumbers
|
||||
from phonenumbers import carrier, geocoder, timezone
|
||||
from sys import stderr
|
||||
|
||||
|
||||
Bl = '\033[30m' # VARIABLE BUAT WARNA CUYY
|
||||
Re = '\033[1;31m'
|
||||
Gr = '\033[1;32m'
|
||||
@@ -24,47 +23,21 @@ Mage='\033[1;35m'
|
||||
Cy = '\033[1;36m'
|
||||
Wh = '\033[1;37m'
|
||||
|
||||
#BANNER TOOLS
|
||||
os.system('clear')
|
||||
stderr.writelines(f"""{Gr}
|
||||
________ __ ______ __
|
||||
/ ____/ /_ ____ _____/ /_ /_ __/________ ______/ /__
|
||||
/ / __/ __ \/ __ \/ ___/ __/_____/ / / ___/ __ `/ ___/ //_/
|
||||
/ /_/ / / / / /_/ (__ ) /_/_____/ / / / / /_/ / /__/ ,<
|
||||
\____/_/ /_/\____/____/\__/ /_/ /_/ \__,_/\___/_/|_|
|
||||
|
||||
{Wh}[ + ] C O D E B Y H U N X [ + ]
|
||||
# utilities
|
||||
|
||||
{Wh}[ 1 ] {Gr}IP Tracker
|
||||
{Wh}[ 2 ] {Gr}Show Your IP
|
||||
{Wh}[ 3 ] {Gr}Phone Tracker
|
||||
{Wh}[ 4 ] {Gr}Username Tracker
|
||||
{Wh}[ 0 ] {Gr}Exit
|
||||
""")
|
||||
|
||||
input_user = input(f'\n {Wh}@Ghost~# {Gr}') #OPSI MENU
|
||||
# decorator for attaching run_banner to a function
|
||||
def is_option(func):
|
||||
def wrapper(*args, **kwargs):
|
||||
run_banner()
|
||||
func(*args, **kwargs)
|
||||
|
||||
|
||||
if input_user == '1': #OPSI 1
|
||||
os.system('clear')
|
||||
time.sleep(1)
|
||||
stderr.writelines(f"""{Wh}
|
||||
.-.
|
||||
.' `. {Wh}--------------------------------
|
||||
:g g : {Wh}| {Gr}GHOST - TRACKER - IP ADDRESS {Wh}|
|
||||
: o `. {Wh}| {Gr}@CODE BY HUNXBYTS {Wh}|
|
||||
: ``. {Wh}--------------------------------
|
||||
: `.
|
||||
: : . `.
|
||||
: : ` . `.
|
||||
`.. : `. ``;
|
||||
`:; `:'
|
||||
: `.
|
||||
`. `. .
|
||||
`'`'`'`---..,___`;.-'
|
||||
""")
|
||||
return wrapper
|
||||
|
||||
try:
|
||||
|
||||
# FUNCTIONS FOR MENU
|
||||
@is_option
|
||||
def IP_Track():
|
||||
ip = input(f"{Wh}\n Enter IP target : {Gr}") # INPUT IP ADDRESS
|
||||
print()
|
||||
@@ -102,33 +75,12 @@ if input_user == '1': #OPSI 1
|
||||
print(f"{Wh} Offset :{Gr}", ip_data["timezone"]["offset"])
|
||||
print(f"{Wh} UTC :{Gr}", ip_data["timezone"]["utc"])
|
||||
print(f"{Wh} Current Time :{Gr}", ip_data["timezone"]["current_time"])
|
||||
if __name__ == '__main__':
|
||||
IP_Track()
|
||||
except KeyboardInterrupt:
|
||||
print(f" {Wh}[{Ye}!{Wh}] {Ye}PROGRAM STOPPED...")
|
||||
|
||||
elif input_user == '3': #OPSI 2
|
||||
os.system('clear')
|
||||
time.sleep(1)
|
||||
stderr.writelines(f"""{Wh}
|
||||
.-.
|
||||
.' `. {Wh}----------------------------------
|
||||
:g g : {Wh}| {Gr}GHOST - TRACKER - PHONE NUMBER {Wh}|
|
||||
: o `. {Wh}| {Gr}@CODE BY HUNXBYTS {Wh}|
|
||||
: ``. {Wh}----------------------------------
|
||||
: `.
|
||||
: : . `.
|
||||
: : ` . `.
|
||||
`.. : `. ``;
|
||||
`:; `:'
|
||||
: `.
|
||||
`. `. .
|
||||
`'`'`'`---..,___`;.-'
|
||||
""")
|
||||
|
||||
try:
|
||||
@is_option
|
||||
def phoneGW():
|
||||
User_phone = input(f"\n {Wh}Enter phone number target {Gr}Ex [+6281xxxxxxxxx] {Wh}: {Gr}") #INPUT NUMBER PHONE
|
||||
User_phone = input(
|
||||
f"\n {Wh}Enter phone number target {Gr}Ex [+6281xxxxxxxxx] {Wh}: {Gr}") # INPUT NUMBER PHONE
|
||||
default_region = "ID" # DEFAULT NEGARA INDONESIA
|
||||
|
||||
parsed_number = phonenumbers.parse(User_phone, default_region) # VARIABLE PHONENUMBERS
|
||||
@@ -138,7 +90,8 @@ elif input_user == '3': #OPSI 2
|
||||
is_valid_number = phonenumbers.is_valid_number(parsed_number)
|
||||
is_possible_number = phonenumbers.is_possible_number(parsed_number)
|
||||
formatted_number = phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.INTERNATIONAL)
|
||||
formatted_number_for_mobile = phonenumbers.format_number_for_mobile_dialing(parsed_number, default_region, with_formatting=True)
|
||||
formatted_number_for_mobile = phonenumbers.format_number_for_mobile_dialing(parsed_number, default_region,
|
||||
with_formatting=True)
|
||||
number_type = phonenumbers.number_type(parsed_number)
|
||||
timezone1 = timezone.time_zones_for_number(parsed_number)
|
||||
timezoneF = ', '.join(timezone1)
|
||||
@@ -153,7 +106,8 @@ elif input_user == '3': #OPSI 2
|
||||
print(f" {Wh}International format :{Gr} {formatted_number}")
|
||||
print(f" {Wh}Mobile format :{Gr} {formatted_number_for_mobile}")
|
||||
print(f" {Wh}Original number :{Gr} {parsed_number.national_number}")
|
||||
print(f" {Wh}E.164 format :{Gr} {phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.E164)}")
|
||||
print(
|
||||
f" {Wh}E.164 format :{Gr} {phonenumbers.format_number(parsed_number, phonenumbers.PhoneNumberFormat.E164)}")
|
||||
print(f" {Wh}Country code :{Gr} {parsed_number.country_code}")
|
||||
print(f" {Wh}Local number :{Gr} {parsed_number.national_number}")
|
||||
if number_type == phonenumbers.PhoneNumberType.MOBILE:
|
||||
@@ -162,65 +116,12 @@ elif input_user == '3': #OPSI 2
|
||||
print(f" {Wh}Type :{Gr} This is a fixed-line number")
|
||||
else:
|
||||
print(f" {Wh}Type :{Gr} This is another type of number")
|
||||
if __name__ == '__main__':
|
||||
phoneGW()
|
||||
except KeyboardInterrupt:
|
||||
print(f" {Wh}[{Ye}!{Wh}] {Ye}PROGRAM STOPPED...")
|
||||
|
||||
elif input_user == '2': #OPSI 3
|
||||
os.system('clear')
|
||||
time.sleep(1)
|
||||
stderr.writelines(f"""{Wh}
|
||||
.-.
|
||||
.' `. {Wh}----------------------------------
|
||||
:g g : {Wh}| {Gr}GHOST - SHOW YOUR IP ADDRESS {Wh}|
|
||||
: o `. {Wh}| {Gr}@CODE BY HUNXBYTS {Wh}|
|
||||
: ``. {Wh}----------------------------------
|
||||
: `.
|
||||
: : . `.
|
||||
: : ` . `.
|
||||
`.. : `. ``;
|
||||
`:; `:'
|
||||
: `.
|
||||
`. `. .
|
||||
`'`'`'---..,___`;.-'
|
||||
""")
|
||||
|
||||
@is_option
|
||||
def TrackLu():
|
||||
try:
|
||||
def showIP():
|
||||
respone = requests.get('https://api.ipify.org/')
|
||||
Show_IP = respone.text
|
||||
|
||||
print(f"\n {Wh}========== {Gr}SHOW INFORMATION YOUR IP {Wh}==========")
|
||||
print(f"\n {Wh}[{Gr} + {Wh}] Your IP Adrress : {Gr}{Show_IP}")
|
||||
print(f"\n {Wh}==============================================")
|
||||
if __name__ == '__main__':
|
||||
showIP()
|
||||
except KeyboardInterrupt:
|
||||
print(f" {Wh}[{Ye}!{Wh}] {Ye}PROGRAM STOPPED...")
|
||||
|
||||
|
||||
|
||||
elif input_user == '4':
|
||||
os.system('clear')
|
||||
time.sleep(1)
|
||||
stderr.writelines(f"""{Wh}
|
||||
.-.
|
||||
.' `. {Wh}----------------------------------
|
||||
:g g : {Wh}| {Gr}GHOST - TRACKER USERNAME {Wh}|
|
||||
: o `. {Wh}| {Gr}@CODE BY HUNXBYTS {Wh}|
|
||||
: ``. {Wh}----------------------------------
|
||||
: `.
|
||||
: : . `.
|
||||
: : ` . `.
|
||||
`.. : `. ``;
|
||||
`:; `:'
|
||||
: `.
|
||||
`. `. .
|
||||
`'`'`'---..,___`;.-'
|
||||
""")
|
||||
try:
|
||||
def TrackLu(username):
|
||||
username = input(f"\n {Wh}Enter Username : {Gr}")
|
||||
results = {}
|
||||
social_media = [
|
||||
{"url": "https://www.facebook.com/{}", "name": "Facebook"},
|
||||
@@ -248,7 +149,6 @@ elif input_user == '4':
|
||||
{"url": "https://www.telegram.me/{}", "name": "Telegram"},
|
||||
{"url": "https://www.weheartit.com/{}", "name": "We Heart It"}
|
||||
]
|
||||
|
||||
for site in social_media:
|
||||
url = site['url'].format(username)
|
||||
response = requests.get(url)
|
||||
@@ -256,18 +156,160 @@ elif input_user == '4':
|
||||
results[site['name']] = url
|
||||
else:
|
||||
results[site['name']] = (f"{Ye}Username not found {Ye}!")
|
||||
return results
|
||||
username = input(f"\n {Wh}Enter Username : {Gr}")
|
||||
except Exception as e:
|
||||
print(f"{Re}Error : {e}")
|
||||
return
|
||||
|
||||
print(f"\n {Wh}========== {Gr}SHOW INFORMATION USERNAME {Wh}==========")
|
||||
print()
|
||||
results = TrackLu(username)
|
||||
for site, url in results.items():
|
||||
print(f" {Wh}[ {Gr}+ {Wh}] {site} : {Gr}{url}")
|
||||
except KeyboardInterrupt:
|
||||
print(f" {Wh}[{Ye}!{Wh}] {Ye}PROGRAM STOPPED...")
|
||||
|
||||
elif input_user == '0':
|
||||
print(f"\n {Wh}[{Ye}!{Wh}] {Ye}THANK'S FOR USING TOOL {Ye}GHOST-TRACK !")
|
||||
|
||||
@is_option
|
||||
def showIP():
|
||||
respone = requests.get('https://api.ipify.org/')
|
||||
Show_IP = respone.text
|
||||
|
||||
print(f"\n {Wh}========== {Gr}SHOW INFORMATION YOUR IP {Wh}==========")
|
||||
print(f"\n {Wh}[{Gr} + {Wh}] Your IP Adrress : {Gr}{Show_IP}")
|
||||
print(f"\n {Wh}==============================================")
|
||||
|
||||
|
||||
# OPTIONS
|
||||
options = [
|
||||
{
|
||||
'num': 1,
|
||||
'text': 'IP Tracker',
|
||||
'func': IP_Track
|
||||
},
|
||||
{
|
||||
'num': 2,
|
||||
'text': 'Show Your IP',
|
||||
'func': showIP
|
||||
|
||||
},
|
||||
{
|
||||
'num': 3,
|
||||
'text': 'Phone Number Tracker',
|
||||
'func': phoneGW
|
||||
},
|
||||
{
|
||||
'num': 4,
|
||||
'text': 'Username Tracker',
|
||||
'func': TrackLu
|
||||
},
|
||||
{
|
||||
'num': 0,
|
||||
'text': 'Exit',
|
||||
'func': exit
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
def clear():
|
||||
# for windows
|
||||
if os.name == 'nt':
|
||||
_ = os.system('cls')
|
||||
# for mac and linux
|
||||
else:
|
||||
print(f" {Ye}Opss no option !") #FALSE
|
||||
_ = os.system('clear')
|
||||
|
||||
|
||||
def call_option(opt):
|
||||
if not is_in_options(opt):
|
||||
raise ValueError('Option not found')
|
||||
for option in options:
|
||||
if option['num'] == opt:
|
||||
if 'func' in option:
|
||||
option['func']()
|
||||
else:
|
||||
print('No function detected')
|
||||
|
||||
|
||||
def execute_option(opt):
|
||||
try:
|
||||
call_option(opt)
|
||||
input(f'\n{Wh}[ {Gr}+ {Wh}] {Gr}Press enter to continue')
|
||||
main()
|
||||
except ValueError as e:
|
||||
print(e)
|
||||
time.sleep(2)
|
||||
execute_option(opt)
|
||||
except KeyboardInterrupt:
|
||||
print(f'\n{Wh}[ {Re}! {Wh}] {Re}Exit')
|
||||
time.sleep(2)
|
||||
exit()
|
||||
|
||||
|
||||
def option_text():
|
||||
text = ''
|
||||
for opt in options:
|
||||
text += f'{Wh}[ {opt["num"]} ] {Gr}{opt["text"]}\n'
|
||||
return text
|
||||
|
||||
|
||||
def is_in_options(num):
|
||||
for opt in options:
|
||||
if opt['num'] == num:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def option():
|
||||
# BANNER TOOLS
|
||||
clear()
|
||||
stderr.writelines(f"""
|
||||
________ __ ______ __
|
||||
/ ____/ /_ ____ _____/ /_ /_ __/________ ______/ /__
|
||||
/ / __/ __ \/ __ \/ ___/ __/_____/ / / ___/ __ `/ ___/ //_/
|
||||
/ /_/ / / / / /_/ (__ ) /_/_____/ / / / / /_/ / /__/ ,<
|
||||
\____/_/ /_/\____/____/\__/ /_/ /_/ \__,_/\___/_/|_|
|
||||
|
||||
{Wh}[ + ] C O D E B Y H U N X [ + ]
|
||||
""")
|
||||
|
||||
stderr.writelines(f"\n\n\n{option_text()}")
|
||||
|
||||
|
||||
def run_banner():
|
||||
clear()
|
||||
time.sleep(1)
|
||||
stderr.writelines(f"""{Wh}
|
||||
.-.
|
||||
.' `. {Wh}--------------------------------
|
||||
:g g : {Wh}| {Gr}GHOST - TRACKER - IP ADDRESS {Wh}|
|
||||
: o `. {Wh}| {Gr}@CODE BY HUNXBYTS {Wh}|
|
||||
: ``. {Wh}--------------------------------
|
||||
: `.
|
||||
: : . `.
|
||||
: : ` . `.
|
||||
`.. : `. ``;
|
||||
`:; `:'
|
||||
: `.
|
||||
`. `. .
|
||||
`'`'`'`---..,___`;.-'
|
||||
""")
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
def main():
|
||||
clear()
|
||||
option()
|
||||
time.sleep(1)
|
||||
try:
|
||||
opt = int(input(f"{Wh}\n [ + ] {Gr}Select Option : {Wh}"))
|
||||
execute_option(opt)
|
||||
except ValueError:
|
||||
print(f'\n{Wh}[ {Re}! {Wh}] {Re}Please input number')
|
||||
time.sleep(2)
|
||||
main()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
except KeyboardInterrupt:
|
||||
print(f'\n{Wh}[ {Re}! {Wh}] {Re}Exit')
|
||||
time.sleep(2)
|
||||
exit()
|
||||
|
||||
Reference in New Issue
Block a user