text
stringlengths
1
93.6k
def show_info(self):
print(logo + '\033[0m \033[97m')
if __name__ == "__main__":
try:
if system() == 'Linux':
fpath = os.path.expanduser("~/hackingtoolpath.txt")
if not os.path.exists(fpath):
os.system('clear')
# run.menu()
print("""
[@] Set Path (All your tools will be installed in that directory)
[1] Manual
[2] Default
""")
choice = input("Z4nzu =>> ").strip()
if choice == "1":
inpath = input("Enter Path (with Directory Name) >> ").strip()
with open(fpath, "w") as f:
f.write(inpath)
print("Successfully Set Path to: {}".format(inpath))
elif choice == "2":
autopath = "/home/hackingtool/"
with open(fpath, "w") as f:
f.write(autopath)
print("Your Default Path Is: {}".format(autopath))
sleep(3)
else:
print("Try Again..!!")
sys.exit(0)
with open(fpath) as f:
archive = f.readline()
os.makedirs(archive, exist_ok=True)
os.chdir(archive)
AllTools().show_options()
# If not Linux and probably Windows
elif system() == "Windows":
print(
r"\033[91m Please Run This Tool On A Debian System For Best Results\e[00m"
)
sleep(2)
webbrowser.open_new_tab("https://tinyurl.com/y522modc")
else:
print("Please Check Your System or Open New Issue ...")
except KeyboardInterrupt:
print("\nExiting ..!!!")
sleep(2)
# <FILESEP>
# Funções:
# Declarando uma função sem aprametro:
def hello():
print('Olá, Mundo!')
hello()
print()
# Declarando uma função com parametro que calcula média de três notas:
def calcula_media(valor1, valor2, valor3):
soma = valor1 + valor2 + valor3
media = soma / 3
return media
nota = calcula_media(8.5, 4.9, 10)
print(f'Média: {nota}')
print()
# Funções recursivas:
def funcaoRecursiva(numero):
if (numero != 1):
funcaoRecursiva(numero - 1)
print(numero)
print("Testando a função recursiva:")
funcaoRecursiva(10)
print()
# Funções II
# Funções com varios parametros: Quando utilizamos um * em parametros, quer dizer que posso passar varios argumentos e esses argumentos são armazenados em
# uma tupla().
def calcula_media1(*args):
soma = sum(args)
media = soma / len(args)
return media