You've already forked hackingtool
mirror of
https://github.com/Z4nzu/hackingtool.git
synced 2025-06-20 06:15:54 +02:00
Minor fixes
This commit is contained in:
17
core.py
17
core.py
@ -1,4 +1,3 @@
|
||||
# coding=utf-8
|
||||
import os
|
||||
import sys
|
||||
import webbrowser
|
||||
@ -69,13 +68,13 @@ class HackingTool(object):
|
||||
if self.PROJECT_URL:
|
||||
print(f"[{98}] Open project page")
|
||||
print(f"[{99}] Back to {parent.TITLE if parent is not None else 'Exit'}")
|
||||
option_index = input("Select an option : ")
|
||||
option_index = input("Select an option : ").strip()
|
||||
try:
|
||||
option_index = int(option_index)
|
||||
if option_index - 1 in range(len(self.OPTIONS)):
|
||||
ret_code = self.OPTIONS[option_index - 1][1]()
|
||||
if ret_code != 99:
|
||||
input("\n\nPress ENTER to continue:")
|
||||
input("\n\nPress ENTER to continue:").strip()
|
||||
elif option_index == 98:
|
||||
self.show_project_page()
|
||||
elif option_index == 99:
|
||||
@ -84,10 +83,10 @@ class HackingTool(object):
|
||||
return 99
|
||||
except (TypeError, ValueError):
|
||||
print("Please enter a valid option")
|
||||
input("\n\nPress ENTER to continue:")
|
||||
input("\n\nPress ENTER to continue:").strip()
|
||||
except Exception:
|
||||
print_exc()
|
||||
input("\n\nPress ENTER to continue:")
|
||||
input("\n\nPress ENTER to continue:").strip()
|
||||
return self.show_options(parent = parent)
|
||||
|
||||
def before_install(self):
|
||||
@ -157,21 +156,21 @@ class HackingToolsCollection(object):
|
||||
for index, tool in enumerate(self.TOOLS):
|
||||
print(f"[{index} {tool.TITLE}")
|
||||
print(f"[{99}] Back to {parent.TITLE if parent is not None else 'Exit'}")
|
||||
tool_index = input("Choose a tool to proceed: ")
|
||||
tool_index = input("Choose a tool to proceed: ").strip()
|
||||
try:
|
||||
tool_index = int(tool_index)
|
||||
if tool_index in range(len(self.TOOLS)):
|
||||
ret_code = self.TOOLS[tool_index].show_options(parent = self)
|
||||
if ret_code != 99:
|
||||
input("\n\nPress ENTER to continue:")
|
||||
input("\n\nPress ENTER to continue:").strip()
|
||||
elif tool_index == 99:
|
||||
if parent is None:
|
||||
sys.exit()
|
||||
return 99
|
||||
except (TypeError, ValueError):
|
||||
print("Please enter a valid option")
|
||||
input("\n\nPress ENTER to continue:")
|
||||
input("\n\nPress ENTER to continue:").strip()
|
||||
except Exception:
|
||||
print_exc()
|
||||
input("\n\nPress ENTER to continue:")
|
||||
input("\n\nPress ENTER to continue:").strip()
|
||||
return self.show_options(parent = parent)
|
||||
|
Reference in New Issue
Block a user