Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Z4nzu
GitHub Repository: Z4nzu/hackingtool
Path: blob/master/tools/tool_manager.py
1268 views
1
# coding=utf-8
2
import os
3
import sys
4
from time import sleep
5
6
from core import HackingTool
7
from core import HackingToolsCollection
8
9
10
class UpdateTool(HackingTool):
11
TITLE = "Update Tool or System"
12
DESCRIPTION = "Update Tool or System"
13
14
def __init__(self):
15
super(UpdateTool, self).__init__([
16
("Update System", self.update_sys),
17
("Update Hackingtool", self.update_ht)
18
], installable = False, runnable = False)
19
20
def update_sys(self):
21
os.system("sudo apt update && sudo apt full-upgrade -y")
22
os.system(
23
"sudo apt-get install tor openssl curl && sudo apt-get update tor openssl curl")
24
os.system("sudo apt-get install python3-pip")
25
26
def update_ht(self):
27
os.system("sudo chmod +x /etc/;"
28
"sudo chmod +x /usr/share/doc;"
29
"sudo rm -rf /usr/share/doc/hackingtool/;"
30
"cd /etc/;"
31
"sudo rm -rf /etc/hackingtool/;"
32
"mkdir hackingtool;"
33
"cd hackingtool;"
34
"git clone https://github.com/Z4nzu/hackingtool.git;"
35
"cd hackingtool;"
36
"sudo chmod +x install.sh;"
37
"./install.sh")
38
39
40
class UninstallTool(HackingTool):
41
TITLE = "Uninstall HackingTool"
42
DESCRIPTION = "Uninstall HackingTool"
43
44
def __init__(self):
45
super(UninstallTool, self).__init__([
46
('Uninstall', self.uninstall)
47
], installable = False, runnable = False)
48
49
def uninstall(self):
50
print("hackingtool started to uninstall..\n")
51
sleep(1)
52
os.system("sudo chmod +x /etc/;"
53
"sudo chmod +x /usr/share/doc;"
54
"sudo rm -rf /usr/share/doc/hackingtool/;"
55
"cd /etc/;"
56
"sudo rm -rf /etc/hackingtool/;")
57
print("\nHackingtool Successfully Uninstalled... Goodbye.")
58
sys.exit()
59
60
61
class ToolManager(HackingToolsCollection):
62
TITLE = "Update or Uninstall | Hackingtool"
63
TOOLS = [
64
UpdateTool(),
65
UninstallTool()
66
]
67
68