-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmy_oneforall.py
More file actions
29 lines (27 loc) · 955 Bytes
/
my_oneforall.py
File metadata and controls
29 lines (27 loc) · 955 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
import re
import subprocess
def sh(command, print_msg=True):
global lj
p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
lines = []
for line in iter(p.stdout.readline, b''):
line = line.rstrip().decode('gbk')
if print_msg:
print(">>>", line)
if "The subdomain result for" in line:
global lj #csv路径
lj=re.findall('(?::\s)(.+)',line)[0]
print(lj) #输出csv路径
else:
try:
if lj!="":
pass
else:
lj=""
except:
pass
pass
lines.append(line)
return lines,lj
if __name__ == '__main__':
sh("python E:\OneForAll-master\oneforall.py --target {0} run".format(input('[INPUT] 请输入主域名:')))