Skip to content

Commit

Permalink
2020:11:29 修复上一版本 关于时间戳和关闭主程序却无法关闭xray的BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
ox01024 committed Nov 29, 2020
1 parent 0169a3e commit f3ae29b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Xray_Rad_Fusion
只需配置xray和rad的路径
~~只需配置xray和rad的路径~~
需将xray和rad与Scan.py放置同一目录下并更改Scan文件中关于xray和rad的名字

并添加目标到**target.txt**中使用python3.8运行即可开始享受吧!
~~并添加目标到**target.txt**中使用python3.8运行即可开始享受吧!~~

###logs:
2020:8:22 输出html结果添加时间戳,不用使用前删除之前的results文件
2020:11:29 修复上一版本 关于时间戳和关闭主程序却无法关闭xray的BUG
22 changes: 12 additions & 10 deletions Scan.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import time
import subprocess
#rad路径(建议使用相对路径)
radPath="./Rad/rad.exe"
#xray路径(建议使用相对路径)
xrayPath="./Xray/xray_windows_amd64.exe"
import os
#rad名字(必须将此文件与rad程序放在同一目录)
radName="rad_windows_amd64.exe"
#xray名字(必须将此文件与rad程序放在同一目录)
xrayName="xray_windows_amd64.exe"
#xray代理地址
xrayProxy="127.0.0.1:7777"
def Scan(target,startxray):
cmd = [radPath,"-t",target,"-http-proxy",xrayProxy]
def Scan(target):
cmd = [radName,"-t",target,"-http-proxy",xrayProxy]
rsp=subprocess.Popen(cmd,start_new_session=True)
rsp.communicate()
with open("target.txt","r") as targats:
result=time.strftime("%Y-%m-%d/%H:%M:%S",time.localtime())
xrayShell = [xrayPath, "webscan", "--listen", xrayProxy, "--html-output", result]
startxray = subprocess.Popen(xrayShell)
outputPath=time.strftime("%Y%m%d%H%M%S",time.localtime())
xrayShell = "start cmd /k "+xrayName+" webscan"+" --listen "+xrayProxy+" --html-output "+outputPath+".html"
os.system(xrayShell)
while targat :=targats.readline().strip("\n"):
Scan(targat,startxray)
Scan(targat)

0 comments on commit f3ae29b

Please sign in to comment.