-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathkali_linux_repair.py
138 lines (138 loc) · 5.14 KB
/
kali_linux_repair.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
import os
def Edit_Sources_File():
while True:
os.system("clear")
banner()
print("""
1) Automatic
2) Manual
99) Back
""")
menu = input(">> ")
if menu == "1":
text= """deb http://http.kali.org/kali kali-rolling main contrib non-free
# For source package access, uncomment the following line
# deb-src http://http.kali.org/kali kali-rolling main contrib non-free"""
file = open("/etc/apt/sources.list", "w")
file.write(text)
file.close
print("Done, Thanks for using this tool, Enjoy :)")
exit()
elif menu == "2":
select = input("Enter name of text editor (like leafpad or gedit or nano) : ")
os.system(select + " /etc/apt/sources.list")
print("Thanks for using this tool, Enjoy :)")
exit()
elif menu == "99":
os.system("clear")
main()
else:
continue
def Updating_System():
while True:
os.system("clear")
banner()
print("""
1) Update only
2) Full Update (With upgrade)
99) Back
""")
menu = input(">> ")
if menu == "1":
os.system("clear")
os.system("apt-get update")
exit()
elif menu == "2":
os.system("clear")
os.system("apt-get update && apt-get -y full-upgrade")
exit()
elif menu == "99":
os.system("clear")
main()
else:
continue
def Fix_PGP_Error():
os.system("clear")
banner()
key = input("Enter key here : ")
os.system("apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys " + key)
print("Done, Thanks for using this tool, Enjoy :)")
exit()
def VMware_Tools():
os.system("clear")
banner()
os.system("apt -y install open-vm-tools-desktop fuse")
Ask_Rebooting = input("Done, You need to reboot your system, reboot now? [y/n] ")
if Ask_Rebooting == "y" or Ask_Rebooting == "yes" or Ask_Rebooting == "Y" or Ask_Rebooting == "Yes":
os.system("reboot")
else:
print("Done, Thanks for using this tool, Enjoy :)")
exit()
def Virtualbox_Tools():
os.system("clear")
banner()
os.system("apt-get install -y virtualbox-guest-x11")
Ask_Rebooting = input("Done, You need to reboot your system, reboot now? [y/n] ")
if Ask_Rebooting == "y" or Ask_Rebooting == "yes" or Ask_Rebooting == "Y" or Ask_Rebooting == "Yes":
os.system("reboot")
else:
print("Done, Thanks for using this tool, Enjoy :)")
exit()
def main():
while True:
os.system("clear")
banner()
print("""
1) Edit sources.list
2) Updating & Upgrading System
3) Fix pgp error
4) install VMware tools on kali (After Update)
5) install Virtualbox tools on kali (After Update)
""")
menu = input(">> ")
if menu == "1":
Edit_Sources_File()
elif menu == "2":
Updating_System()
elif menu == "3":
Fix_PGP_Error()
elif menu == "4":
VMware_Tools()
elif menu == "5":
Virtualbox_Tools()
else:
continue
def banner():
print("""
(
@ @
@@ @
@%,*@@@@@@ *@%@@
,@@@@@@@@@@@@@@@@@@@@
@@@@@@@. .@@@@@@@@@@@
@@@@@ @@@@@@@@@
&@@@@ @@@@@@@@
@@@@ @@@@@@@@
@@@@% @@@@@@
&@@@@ @@@@@
@ @@@@ *@@@#
(@@@@& @@
#@@@@@
@@@@
@@@
@
@
*
██╗ ██╗ █████╗ ██╗ ██╗ ██████╗ ███████╗██████╗ █████╗ ██╗██████╗
██║ ██╔╝██╔══██╗██║ ██║ ██╔══██╗██╔════╝██╔══██╗██╔══██╗██║██╔══██╗
█████╔╝ ███████║██║ ██║ ██████╔╝█████╗ ██████╔╝███████║██║██████╔╝
██╔═██╗ ██╔══██║██║ ██║ ██╔══██╗██╔══╝ ██╔═══╝ ██╔══██║██║██╔══██╗
██║ ██╗██║ ██║███████╗██║ ██║ ██║███████╗██║ ██║ ██║██║██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝
~ simple tool for repair kali linux of some problems
""")
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("\nThanks for using this tools, Enjoy :)")