-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstaller.py
44 lines (44 loc) · 1.87 KB
/
uninstaller.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
#!/usr/bin/env python
'''
OWASP ZSC
https://www.owasp.org/index.php/OWASP_ZSC_Tool_Project
https://github.com/zscproject/OWASP-ZSC
http://api.z3r0d4y.com/
https://groups.google.com/d/forum/owasp-zsc [ owasp-zsc[at]googlegroups[dot]com ]
'''
import os
import sys
from core import start
from core import color
#start.logo()
if 'linux' in sys.platform:
if os.geteuid() is not 0:
sys.exit(color.color('red') + 'Sorry, you most run this file as root.'
+ color.color('reset'))
os.system('clear')
print(color.color('green') + 'Removing Files' + color.color('white'))
os.system('rm -rf /usr/share/owasp_zsc /usr/bin/zsc')
print(color.color('green') + 'Files Removed!' + color.color('white'))
elif 'darwin' in sys.platform:
if os.geteuid() is not 0:
sys.exit(color.color('red') + 'Sorry, you most run this file as root.'
+ color.color('reset'))
os.system('clear')
print(color.color('green') + 'Removing Files' + color.color('white'))
os.system('rm -rf /usr/local/share/owasp_zsc /usr/local/bin/zsc')
print(color.color('green') + 'Files Removed!' + color.color('white'))
elif 'win32' in sys.platform or 'win64' in sys.platform:
#import ctypes
#if ctypes.windll.shell32.IsUserAnAdmin() != 1:
# sys.exit(color.color('red')+'Sorry, you most run this file as admin.'+color.color('reset'))
print(color.color('green') + 'Removing Files' + color.color('white'))
installing_path = str(sys.prefix) + str('\\Scripts\\zsc')
os.system('rmdir %s /s /q' % installing_path)
os.system('del %s\\..\\zsc.bat /f' % installing_path)
print(color.color('green') + 'Files Removed!' + color.color('white'))
else:
sys.exit(
color.color('red') +
'OWASP ZSC currently supports uninstall on windows/linux/osx only, for other platforms please remove source files.'
+ color.color('reset'))
start.sig()