-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuninstall.py
55 lines (53 loc) · 2.08 KB
/
uninstall.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
#!/usr/bin/python3
# black-Webbrowser v1.5
import os,subprocess,platform
try:
from tkinter import *
from tkinter.ttk import *
from tkinter.messagebox import showerror
from ttkbootstrap import Style
except ImportError:
subprocess.getoutput("pip install tk-tools")
class black_webbrowser(Tk):
def __init__(self):
super(black_webbrowser,self).__init__()
self.title('Hacker-Webbrowser/Uninstalling')
self.style = Style("cyborg")
label_l = Label(self,text='Hacker-Webbrowser',background='white',foreground='black',font=("None",15))
label_l.place(bordermode=INSIDE,x=120,y=20)
self.uninstall_b = Button(self,text='uninstall',command=self.uninstall)
self.uninstall_b.place(bordermode=OUTSIDE,x=160,y=110)
self.exit_b = Button(self,text='Exit',command=self.ext)
self.exit_b.place(bordermode=OUTSIDE,x=160,y=135)
self.photo = PhotoImage(file = './Scr/black/png')
self.iconphoto(False,self.photo)
self.config(background='white')
self.resizable(False,False)
self.geometry("400x300")
self.mainloop()
def uninstall(self):
global pr
pr = Progressbar(self,orient='horizontal',mode='determinate',length=200)
pr.place(bordermode=INSIDE,x=105,y=65)
pr.start(55)
pr.after(6000,self.uninstall_2)
def uninstall_2(self):
subprocess.getoutput("cd .. && rm -r black-Webbrowser")
pr.stop()
pr.destroy()
label_mess = Label(self,text='Complete!',foreground='black',background='white')
label_mess.place(bordermode=INSIDE,x=170,y=65)
self.uninstall_b.destroy()
self.exit_b.place(bordermode=OUTSIDE,x=160,y=110)
def ext(self):
self.destroy()
self.quit()
quit()
if __name__ == '__main__':
if platform.system() == 'Linux':
if os.getuid() == 0:
window = black_webbrowser()
else:
showerror(title='Cannot Running',message='Please, Check Root!')
else:
window = black_webbrowser()