xray批量扫描url

编程入门 行业动态 更新时间:2024-10-13 00:33:09

xray<a href=https://www.elefans.com/category/jswz/34/1770428.html style=批量扫描url"/>

xray批量扫描url

xray批量扫描url

**思路:**从txt文本文档中按序导出url,写好系统命令后用python来依次执行命令,并生成报告到xray根目录。

示例:

代码:

#author: 想学点black技术
#用法: 在bat.py的同目录下生成xray_url.txt,根据自己的需求更改scan_command即可
#time: 2020年12月16日20:27:40
#环境: python3
#说明: command中的xray路径需要手动修改,报告生成的位置在同一目录下import os
import hashlib
import re# 扫描
def get_url():f = open("xray_url.txt")lines = f.readlines()# 匹配http | https请求头pattern = repile(r'^(https|http)://')for line in lines:try:if not pattern.match(line.strip()):targeturl="http://"+line.strip()else:targeturl=line.strip()# print(targeturl.strip())outputfilename=hashlib.md5(targeturl.encode("utf-8"))do_scan(targeturl.strip(), outputfilename.hexdigest())except Exception as e:print(e)passf.close()print("Xray Scan End~")return# 报告
def do_scan(targeturl,outputfilename="test"):scan_command="C:/Users/Administrator/Desktop/xray_windows_amd64.exe.lnk webscan --basic-crawler {} --html-output {}.html".format(targeturl,outputfilename)# scan_command = "ping 943ogg.dnslog"# print(scan_command)os.system(scan_command)returnif __name__ == '__main__':get_url()

更多推荐

xray批量扫描url

本文发布于:2024-02-06 12:51:13,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1748785.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:批量   xray   url

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!