Example #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")
Example #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")
Example #3
0
def tick():
    gchelp()
    print("\n\nsniffertask count:%d" % (sniffertask.getObject().get_length()))
    #    pdb.set_trace()
    if sniffertask.getObject().get_length() > 50:
        print('Too much work: %s' % datetime.now())
        pass
    else:
        num = random.randint(1, 9)
        # temp = zmaptool.getObject()
        #        print (str(num), "init masscantool object.")
        temp = masscantool.getObject()
        #        print ("masscan do scan.")
        temp.do_scan(port=operator.get(str(num)), num='50', needdetail='1')
    print('Tick! The time is: %s' % datetime.now())
Example #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")
Example #5
0
def tick():
    if sniffertask.getObject().get_length() > 50:
        print('too much work: %s' % datetime.now())
        pass
    else:
        num = random.randint(1, 1)
        temp = zmaptool.getObject()  #init DB/portscan...
        temp.do_scan(port=operator.get(str(num)), num='20', needdetail='1')
    print('Tick! The time is: %s' % datetime.now())
Example #6
0
def getwork(request):
    data={}
    taskinstance=sniffertask.getObject()
    tempwork=taskinstance.get_work()
    
    if len(tempwork)>0:
        data['result']='1'
        data['jobs']=tempwork
    else:
        data['result']='0'
    
    return HttpResponse(json.dumps(data,skipkeys=True,default=webtool.object2dict), content_type="application/json")   
Example #7
0
def tick():
    if sniffertask.getObject().get_length()>30:
        print('too much work: %s' % datetime.now())
        pass
    else:

        num=random.randint(1, 1)

        temp=zmaptool.getObject()

        temp.do_scan(port=operator.get(str(num)),num='20',needdetail='1')
    print('Tick! The time is: %s' % datetime.now())
Example #8
0
def getwork(request):
    data = {}
    taskinstance = sniffertask.getObject()
    tempwork = taskinstance.get_work()  # ThreadTool.py定义,获取剩余任务,集群操作

    if len(tempwork) > 0:
        data['result'] = '1'
        data['jobs'] = tempwork
    else:
        data['result'] = '0'
    return HttpResponse(json.dumps(data,
                                   skipkeys=True,
                                   default=webtool.object2dict),
                        content_type="application/json")