forked from cys3c/secHub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstaller.py
More file actions
38 lines (29 loc) · 696 Bytes
/
installer.py
File metadata and controls
38 lines (29 loc) · 696 Bytes
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
#!/usr/bin/env python2
#-*- coding: utf-8 -*-
#
#
__author__ = "Josh"
import os
import pip
content = """
#!/bin/bash
cd /usr/share/sechub
python2 sechub.py "$@"
"""
def main():
if os.name != "nt":
if os.getuid() == 0:
os.system("git clone https://github.com/cys3c/secHub.git /usr/share/sechub")
for i in ["termcolor", "datetime"]:
pip.main(["install", i])
file = open("/usr/bin/sechub", "w")
file.write(content)
file.close()
os.system("chmod +x /usr/bin/sechub")
print "\n\n[+] Installation finished, type 'sechub' to use program!"
else:
print "Run as root!"
else:
print "This script doesn't work on Windows!"
if __name__ == "__main__":
main()