text
stringlengths
0
93.6k
def clr():
if os.name == "nt":
os.system("cls")
else:
os.system("clear")
def bann_text():
clr()
logo = """
░▀▀█▀▀░█░░░░█▀▀█░░░░▒█▀▀▄░▄▀▀▄░█▀▄▀█░█▀▀▄░█▀▀░█▀▀▄
░░▒█░░░█▀▀█░░▒▀▄░▀▀░▒█▀▀▄░█░░█░█░▀░█░█▀▀▄░█▀▀░█▄▄▀
░░▒█░░░▀░░▀░█▄▄█░░░░▒█▄▄█░░▀▀░░▀░░▒▀░▀▀▀▀░▀▀▀░▀░▀▀
"""
if ASCII_MODE:
logo = ""
version = "Version: "+__VERSION__
contributors = "Made By: "+" ".join(__CONTRIBUTORS__)
print(random.choice(ALL_COLORS) + logo + RESET_ALL)
mesgdcrt.SuccessMessage(version)
mesgdcrt.SectionMessage(contributors)
print()
def check_intr():
try:
requests.get("https://motherfuckingwebsite.com")
except Exception:
bann_text()
mesgdcrt.FailureMessage("Poor internet connection detected")
sys.exit(2)
def format_phone(num):
num = [n for n in num if n in string.digits]
return ''.join(num).strip()
def do_zip_update():
success = False
if DEBUG_MODE:
zip_url = "https://github.com/Hackertrackersj/Tbomb/archive/refs/heads/master.zip"
dir_name = "TBomb-dev"
else:
zip_url = "https://github.com/Hackertrackersj/Tbomb/archive/refs/heads/master.zip"
dir_name = "TBomb-master"
print(ALL_COLORS[0]+"Downloading ZIP ... "+RESET_ALL)
response = requests.get(zip_url)
if response.status_code == 200:
zip_content = response.content
try:
with zipfile.ZipFile(BytesIO(zip_content)) as zip_file:
for member in zip_file.namelist():
filename = os.path.split(member)
if not filename[1]:
continue
new_filename = os.path.join(
filename[0].replace(dir_name, "."),
filename[1])
source = zip_file.open(member)
target = open(new_filename, "wb")
with source, target:
shutil.copyfileobj(source, target)
success = True
except Exception:
mesgdcrt.FailureMessage("Error occured while extracting !!")
sys.exit()
def do_git_update():
success = False
try:
print(ALL_COLORS[0]+"UPDATING "+RESET_ALL, end='')
process = subprocess.Popen("git checkout . && git pull ",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
while process:
print(ALL_COLORS[0]+'.'+RESET_ALL, end='')
time.sleep(1)
returncode = process.poll()
if returncode is not None:
break
success = not process.returncode
except Exception:
success = False
print("\n")
def update():
if shutil.which('git'):
do_git_update()
else:
do_zip_update()
def check_for_updates():
if DEBUG_MODE: