forked from cream-sec/Xray_Rad_Fusion
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2020:11:29 修复上一版本 关于时间戳和关闭主程序却无法关闭xray的BUG
- Loading branch information
Showing
2 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|