美文网首页
python-scan(awvs)

python-scan(awvs)

作者: amazing_bing | 来源:发表于2017-03-27 17:57 被阅读0次

awvs web接口如下:

awvs接口:
* /api/auth - 认证 
* /api/listLoginSeq - 认证 
* /api/listProfiles - 查看扫描配置 
* /api/listReports - 查看报表 
* /api/listScans - 查看扫描任务 
* /api/listSettings - 扫描配置 
* /api/listTemplates - 
* /api/addScan - 新建扫描(批量、单任务) 
add_api:
scan,scanList
target,targetList
recurse[-1一次,0 每天,9 每周,10 每月]  
date strftime("%m/%d/%Y", gmtime())
time "%s:%s" % (datetime.now().hour, datetime.now().minute+1)
deleteAfterCompletion "False"
"params":{"profile":"Default",
         "loginSeq":"<none>",
         "settings":"Default",
         "scanningmode":"heuristic",
         "excludedhours":"<none>",
         "savetodatabase":"True",
         "savelogs":"False",
         "generatereport":"False",
         "reportformat":"PDF",
         "reporttemplate":"WVSDeveloperReport.rep ",
         "emailaddress":""}
}

* /api/editScan - 编辑扫描任务 
* /api/getScanHistory - 扫描历史纪录 
* /api/clearScanHistory - 删除扫描记录 
* /api/pauseScan - 暂停扫描 
* /api/resumeScan - 恢复扫描 
* /api/stopScan - 停止扫描 
* /api/deleteAllScans - 删除所有扫描 
* /api/deleteScans - 删除单一扫描任务 
* /api/getScanResults - 查看扫描结果 
* /api/deleteScanResults - 删除扫描结果 
* /api/download/+scanid - 下载扫描结果 

直接调用接口增加扫描任务,代码如下:

'''
# coding:utf-8
# Author : Bing
# Date : 27/3/2017
# Email : amazing_bing@outlook.com
# Description :
'''

import httplib,json
from datetime import datetime
from time import gmtime, strftime

class SqlScanTask:
    def __init__(self):
        self.api_url = "127.0.0.1"
        self.api_port = 8183
        self.api_header = {
                            "Content-Type": "application/json; charset=UTF-8",
                            "X-Requested-With": "XMLHttpRequest",
                            "Accept": "application/json, text/javascript, */*; q=0.01",
                            "RequestValidated": "true"
                        }

    def awvs_list_mod(self):
        pass
    
    def awvs_add_mod(self,domain):
        ACUDATA = {"scanType":"scan",
                   "targetList":"",
                   "target":["%s" % domain],
                   "recurse":"-1",
                   "date":strftime("%m/%d/%Y", gmtime()),
                   "dayOfWeek":"1",
                   "dayOfMonth":"1",
                   "time": "%s:%s" % (datetime.now().hour, datetime.now().minute+1),
                   "deleteAfterCompletion":"False",
                   "params":{"profile":"Default",
                             "loginSeq":"<none>",
                             "settings":"Default",
                             "scanningmode":"heuristic",
                             "excludedhours":"<none>",
                             "savetodatabase":"True",
                             "savelogs":"False",
                             "generatereport":"False",
                             "reportformat":"PDF",
                             "reporttemplate":"WVSDeveloperReport.rep ",
                             "emailaddress":""}
                   }

        conn = httplib.HTTPConnection(self.api_url, self.api_port)
        add_data = json.dumps(ACUDATA)
        conn.request("POST", "/api/addScan", add_data , self.api_header)
        resp = conn.getresponse()
        content = resp.read()
        #{"result":"FAIL","errorMessage":"invalid website URL!"}
        #{"result":"OK","data":["6"]}
        status = resp.status
        if status == 200 and "OK" in content :
            return 1
        else:
            return 0

    def awvs_del_mod(self):
        pass




task = SqlScanTask()
result = task.awvs_add_mod("http://www.bau.com")
print result

    

项目地址:https://github.com/Canbing007/awvs_agent

截图:

111.png 222.png

相关文章

  • python-scan(awvs)

    awvs web接口如下: 直接调用接口增加扫描任务,代码如下: 项目地址:https://github.com/...

  • Linux 安装最新破解版awvs教程

    AWVS简介: Acunetix Web Vulnerability Scanner(简称AWVS)是一款知名的网...

  • 三个扫描常用工具

    AWVS AppScan Nessus

  • awvs

    https://blog.csdn.net/lynnlinlin/article/details/52947526

  • AWVS扫描器扫描web漏洞

    AWVS(Acunetix Web Vulnerability Scanner) WVS(Web Vulnerab...

  • 学习awvs

    下载安装 下载 Acunetix_Web_Vulnerability_Scanner_10破解版 http://d...

  • AWVS介绍

    AWVS(Acunetix Web Vulnerability Scanner)简介 WVS(Web Vulner...

  • awvs安装

    1.先通过官方地址下载最新的企业版安装包,安装完成后关闭程序打开破解补丁,点Patch后可正常注册了,注册信息如下...

  • 04 AWVS

    安装先注册 用于登录

  • wukong agent

    Wukong Scanner Agent v1 Requisites python redis awvs api ...

网友评论

      本文标题:python-scan(awvs)

      本文链接:https://www.haomeiwen.com/subject/yywrottx.html