网站建设自我总结,旅游网站官网,青县网站建设公司,网站开发和网站维护有区别吗免责声明:内容仅供参考... 目录
AWVS自动添加任务字典
AWVS环境:
SQLmap api 自动扫描
Xray 扫描漏洞发现报告 AWVS自动添加任务字典
AWVS13批量脚本_111111111115-CSDN博客
import requests, json# https://blog.csdn.net/wy_97/article/details/106872773
# 创建任务… 免责声明:内容仅供参考... 目录
AWVS自动添加任务字典
AWVS环境:
SQLmap api 自动扫描
Xray 扫描漏洞发现报告 AWVS自动添加任务字典
AWVS13批量脚本_111111111115-CSDN博客
import requests, json# https://blog.csdn.net/wy_97/article/details/106872773
# 创建任务
def new_id(key, url):api_add_url https://localhost:3443/api/v1/targetsheaders {X-Auth: key,Content-type: application/json}data {address:%s,description:create_by_reaper,criticality:10} % urlr requests.post(urlapi_add_url, headersheaders, datadata, verifyFalse).json()id r[target_id]if id is not None:print(新建任务ID成功ID: id)return id# 启动任务
def start_id(key, id):headers {X-Auth: key,Content-type: application/json}api_run_url https://localhost:3443/api/v1/scansdata1 {profile_id:11111111-1111-1111-1111-111111111111,schedule:{disable:false,start_date:null,time_sensitive:false},target_id:%s} % idr1 requests.post(urlapi_run_url, headersheaders, datadata1, verifyFalse).json()if r1[scan_id] is not None:print(启动扫描ID成功ID id)if __name__ __main__:key AWVS的key!!! for url in open(url.txt):id new_id(key, url.replace(\n, ))start_id(key, id)AWVS环境:
https://www.ddosi.org/awvs-5/ SQLmap api 自动扫描 import timeimport requests,json# 0.启用sqlmap-API服务 python sqlmapapi.py -s
# 1.创建新任务记录任务ID get(/task/new)
# 2.设置任务ID扫描信息 post(/option/taskid/set )
# 3.开始扫描对应ID任务 post(/scan/taskid/start)
# 4.读取扫描状态判断结果 get(/scan/taskid/status)
# 5.如果结束删除ID并获取结果 get(/task/taskid/delete)
# 6.扫描结果查看 get(/scan/taskid/data)#创建任务
def new_id():headers {Content-type: application/json}urlhttp://127.0.0.1:8775/task/newresprequests.get(url,headersheaders).json()if resp[success] is True:print(-1、创建任务ID成功IDresp[taskid])return resp[taskid]def set_id(id,scanurl):headers {Content-type: application/json}data{url:scanurl}url http://127.0.0.1:8775/option/%s/set%id#print(url)resp requests.post(url,datajson.dumps(data),headersheaders).json()#print(resp)if resp[success] is True:print(-2、设置任务ID成功ID id)print(-2、任务对应URL成功URL scanurl)def start_id(id,scanurl):headers {Content-type: application/json}data {url: scanurl}url http://127.0.0.1:8775/scan/%s/start%idresp requests.post(url, datajson.dumps(data),headersheaders).json()if resp[success] is True:print(-3、启动任务ID成功ID id)print(-3、启动对应URL成功URL scanurl)def status_id(id):#get(/scan/taskid/status)headers {Content-type: application/json}url http://127.0.0.1:8775/scan/%s/status % idprint(-4、扫描任务还没完成请等待...)while True:resp requests.get(url, headersheaders).json()if resp[status] running:continueelse:print(-4、扫描任务已完成)breakdef data_id(id,scanurl):#扫描结果查看 get(/scan/taskid/data)headers {Content-type: application/json}url http://127.0.0.1:8775/scan/%s/data % idresp requests.get(url, headersheaders)if resp.json()[data][0][status] 1:print(---存在注入---)print(scanurl)with open(result.txt,a) as f:f.write(resp.text)f.write(\n python sqlmapapi by xiaodisec \n)f.write(----------------------------------------------------- \n)f.close()print(-5、注入任务ID已完成请查看结果result.txt)def delete_id(id):#get(/task/taskid/delete)headers {Content-type: application/json}url http://127.0.0.1:8775/task/%s/delete % idresp requests.get(url, headersheaders).json()if resp[success] is True:print(-6、删除任务ID:%s成功 % id)time.sleep(3)if __name__ __main__:for url in open(url.txt):idnew_id()set_id(id,url.replace(\n,))start_id(id,url.replace(\n,))status_id(id)data_id(id,url.replace( \n,))delete_id(id)print(----------------------------------) Xray 扫描漏洞发现报告
Github: https://github.com/chaitin/xray/releases
https://docs.xray.cool/#/webhook/webhook from flask import Flask, request
import requestsapp Flask(__name__)# https://docs.xray.cool/#/webhook/webhook
app.route(/webhook, methods[POST])
def xray_webhook():url https://sctapi.ftqq.com/SCT75428T2Fd9hkLOmLXk53uWeFtl17TD.send?titleXray find vuln!!!try:# 接受传递过来的数据转换json格式vuln request.jsoncontent ## xray 发现了新漏洞url: {url}插件: {plugin}漏洞类型: {vuln_class}请及时查看和处理.format(urlvuln[data][target][url], pluginvuln[data][plugin], vuln_classvuln[type])print(content)data {desp: content}print(data)requests.post(url, datadata)return okexcept Exception as e:passif __name__ __main__:app.run()