forked from themycode/python-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgonjusetup.py
46 lines (43 loc) · 1.21 KB
/
gonjusetup.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
import os
import time
import threading
import re
import optparse
logo="######################" \
"#此脚本将安装以下所有工具 #" \
"#制作人:即刻安全-九世 # " \
"##################### "
print(logo)
def main():
usage="-x 安装信息收集工具包" \
"-s 数据库扫描器"
parser=optparse.OptionParser(usage)
parser.add_option('-x',action='store_true',dest='xs',help='-x')
parser.add_option('-s',action='store_true',dest='sj',help='-s')
(options,args)=parser.parse_args()
if options.xs:
x=threading.Thread(target=xs,args=())
x.start()
elif options.sj:
s=threading.Thread(target=sj,args=())
s.start()
else:
parser.print_help()
exit()
def xs():
vis=open('mulu.txt','r').read()
print('[*]将安装:')
print(vis)
time.sleep(1)
print('[+]清空')
os.system('clear')
print('[+]开始安装')
vss=open('mulu.txt','r')
for w in vss.readlines():
sq=re.findall('[a-zA-z]+://[^\s]*',w)
for w in sq:
print('[+]正在安装:{}'.format(w))
os.system('git clone {}'.format(w))
print('')
if __name__ == '__main__':
main()