示例#1
0
def systeminfo(request):
    from spidertool import sniffertask, zmaptool, portscantask, Sqldatatask
    from spidertool.template_identify.fluzzdetect import fuzztask
    from spidertool.template_identify.poc_file import pocsearchtask
    resultdata = {}
    resultdata['nmapfont'] = taskcontrol.getObject().get_length()
    resultdata['nmapfont_running'] = taskcontrol.getObject(
    ).get_current_task_num()
    resultdata['nmapback'] = sniffertask.getObject().get_length()
    resultdata['nmapback_running'] = sniffertask.getObject(
    ).get_current_task_num()
    resultdata['portacsn'] = portscantask.getObject().get_length()
    resultdata['portacsn_running'] = portscantask.getObject(
    ).get_current_task_num()
    resultdata['fuzz'] = fuzztask.getObject().get_length()
    resultdata['fuzz_running'] = fuzztask.getObject().get_current_task_num()
    resultdata['pocdect'] = pocsearchtask.getObject().get_length()
    resultdata['pocdect_running'] = pocsearchtask.getObject(
    ).get_current_task_num()
    resultdata['sqltask'] = Sqldatatask.getObject().get_length()
    resultdata['sqltask_running'] = Sqldatatask.getObject(
    ).get_current_task_num()
    return HttpResponse(json.dumps(resultdata,
                                   skipkeys=True,
                                   default=webtool.object2dict),
                        content_type="application/json")
示例#2
0
def systeminfo(request):
    from spidertool import sniffertask, zmaptool, portscantask, Sqldatatask
    from spidertool.detection.fluzzdetect import fuzztask
    #    from spidertool.detection.vuldect import pocsearchtask
    resultdata = {}
    # TaskTool中定义的对象信息
    resultdata['nmapfont'] = taskcontrol.getObject().get_length(
    )  # threadtool.getqueue_size()
    resultdata['nmapfont_running'] = taskcontrol.getObject(
    ).get_current_task_num()  #get_running_size()

    resultdata['nmapback'] = sniffertask.getObject().get_length()  #
    resultdata['nmapback_running'] = sniffertask.getObject(
    ).get_current_task_num()

    resultdata['portacsn'] = portscantask.getObject().get_length()
    resultdata['portacsn_running'] = portscantask.getObject(
    ).get_current_task_num()

    resultdata['fuzz'] = fuzztask.getObject().get_length()
    resultdata['fuzz_running'] = fuzztask.getObject().get_current_task_num()

    #    resultdata['pocdect'] = pocsearchtask.getObject().get_length()
    #    resultdata['pocdect_running']=pocsearchtask.getObject().get_current_task_num()

    resultdata['sqltask'] = Sqldatatask.getObject().get_length()
    resultdata['sqltask_running'] = Sqldatatask.getObject(
    ).get_current_task_num()

    return HttpResponse(json.dumps(resultdata,
                                   skipkeys=True,
                                   default=webtool.object2dict),
                        content_type="application/json")
示例#3
0
    def __init__(self, islocalwork=config.Config.islocalwork):
        '''
        Constructor
        '''
        try:
            self.nma = nmap.PortScanner(
            )  # instantiate nmap.PortScanner object

            self.params = '-A   -Pn  -sC  -R -v  -O '


#             self.params='-sV -T4 -O '                    #快捷扫描加强版
#             self.params='-sS -sU -T4 -A -v'                                            #深入扫描
        except nmap.PortScannerError:
            print('Nmap not found', sys.exc_info()[0])

        except:
            print('Unexpected error:', sys.exc_info()[0])
        self.uploadwork = uploadtask.getObject()
        self.config = config.Config
        self.webconfig = webconfig.WebConfig
        self.sqlTool = Sqldatatask.getObject()
        self.islocalwork = islocalwork
        self.portscan = portscantask.getObject()
        import spidertool.getLocationTool as getLocationTool
        self.getlocationtool = getLocationTool.getObject()
示例#4
0
def systeminfo(request):
    from spidertool import sniffertask, zmaptool,portscantask
    from spidertool.template_identify.fluzzdetect import fuzztask
    from spidertool.template_identify.poc_file import pocsearchtask
    resultdata={}
    resultdata['nmapfont']=taskcontrol.getObject().get_length()
    resultdata['nmapfont_running'] = taskcontrol.getObject().get_current_task_num()
    resultdata['nmapback']=sniffertask.getObject().get_length()
    resultdata['nmapback_running'] = sniffertask.getObject().get_current_task_num()
    resultdata['portacsn']=portscantask.getObject().get_length()
    resultdata['portacsn_running'] = portscantask.getObject().get_current_task_num()
    resultdata['fuzz']=fuzztask.getObject().get_length()
    resultdata['fuzz_running'] = fuzztask.getObject().get_current_task_num()
    resultdata['pocdect'] = pocsearchtask.getObject().get_length()
    resultdata['pocdect_running']=pocsearchtask.getObject().get_current_task_num()

    return HttpResponse(json.dumps(resultdata,skipkeys=True,default=webtool.object2dict), content_type="application/json")