예제 #1
0
def start():
    if kb.targets and kb.targets.qsize() > 1:
        infoMsg = "pocsuite got a total of %d targets" % kb.targets.qsize()
        logger.log(CUSTOM_LOGGING.SYSINFO, infoMsg)

    runThreads(conf.threads, pocThreads)

    resultTable = PrettyTable(["target-url", "poc-name", "poc-id", "component", "version", "status"])
    resultTable.padding_width = 1

    if not kb.results:
        return

    toNum, sucNum = 0, 0
    for row in kb.results:
        resultTable.add_row(list(row)[:-2])
        toNum += 1
        if row[5] == 'success':
            sucNum += 1

    if not conf.quiet:
        print resultTable
        # infoMsg = "{} of {} success !".format(sucNum, toNum)
        # logger.log(CUSTOM_LOGGING.SYSINFO, infoMsg)
        print "success : {} / {}".format(sucNum, toNum)

    _createTargetDirs()
    _setRecordFiles()

    if conf.report:
        _setReport()
예제 #2
0
    def do_show(self, args):

        graph = PrettyTable(["config", "value"])
        graph.align["config"] = "l"

        for k, v in conf.iteritems():
            if v and k != 'httpHeaders':
                graph.add_row([k, v])
        print graph
예제 #3
0
파일: consoles.py 프로젝트: gyyyy/Pocsuite
    def do_show(self, args):

        graph = PrettyTable(["config", "value"])
        graph.align["config"] = "l"

        for k, v in conf.iteritems():
            if v and k != 'httpHeaders':
                graph.add_row([k, v])
        print graph
예제 #4
0
파일: consoles.py 프로젝트: gyyyy/Pocsuite
    def do_search(self, args):
        graph = PrettyTable(["pocId", "PocName"])
        graph.align["PocName"] = "m"
        graph.padding_width = 1

        for k, v in kb.unloadedList.iteritems():
            if str(args) in v:
                graph.add_row([k, filepathParser(v)[1]])
        print graph
        pass
예제 #5
0
파일: consoles.py 프로젝트: gyyyy/Pocsuite
def avaliable():
    graph = PrettyTable(["pocId", "avaliablePocName", "Folder"])
    graph.align["PocsName"] = "m"
    graph.padding_width = 1

    for k, v in kb.unloadedList.iteritems():
        path, name = filepathParser(v)
        graph.add_row([k, name, os.path.relpath(path, paths.POCSUITE_ROOT_PATH)])

    print graph
    print
예제 #6
0
    def do_unload(self, args):
        # TODO 补全
        graph = PrettyTable(["pocId", "unloadPocsName"])
        graph.align["unloadPocsName"] = "m"
        graph.padding_width = 1

        if hasattr(kb, 'unloadedList') and getattr(kb, 'unloadedList'):
            for no in sorted(kb.unloadedList.keys()):
                from ntpath import split
                graph.add_row([no, split(kb.unloadedList[no])[1]])
        else:
            graph.add_row(["0", "None"])
        print graph
        print
예제 #7
0
    def do_loaded(self, args):
        registerPocFromDict()

        graph = PrettyTable(["pocId", "loadedPocsName"])
        graph.align["LoadedPocsName"] = "m"
        graph.padding_width = 1
        count = 0

        if hasattr(kb, 'registeredPocs') and getattr(kb, 'registeredPocs'):
            for poc in sorted(kb.registeredPocs.keys()):
                count += 1
                graph.add_row([count, poc])
        else:
            graph.add_row(["0", "None"])
        print graph
        print
예제 #8
0
    def do_search(self, args):
        graph = PrettyTable(["pocId", "PocName"])
        graph.align["PocName"] = "m"
        graph.padding_width = 1

        for k, v in kb.unloadedList.iteritems():
            if str(args) in v:
                graph.add_row([k, filepathParser(v)[1]])
        print graph
        pass
예제 #9
0
파일: consoles.py 프로젝트: GH-JY/Pocsuite
def avaliable():
    graph = PrettyTable(["pocId", "avaliablePocName", "Folder"])
    graph.align["PocsName"] = "m"
    graph.padding_width = 1

    for k, v in kb.unloadedList.iteritems():
        path, name = filepathParser(v)
        graph.add_row([k, name, os.path.relpath(path, paths.POCSUITE_ROOT_PATH)])

    print graph
    print
예제 #10
0
파일: consoles.py 프로젝트: gyyyy/Pocsuite
    def do_unload(self, args):
        # TODO 补全
        graph = PrettyTable(["pocId", "unloadPocsName"])
        graph.align["unloadPocsName"] = "m"
        graph.padding_width = 1
        count = 0

        if hasattr(kb, 'unloadedList') and getattr(kb, 'unloadedList'):
            for no in sorted(kb.unloadedList.keys()):
                from ntpath import split
                graph.add_row([no, split(kb.unloadedList[no])[1]])
        else:
            graph.add_row(["0", "None"])
        print graph
        print
예제 #11
0
파일: consoles.py 프로젝트: gyyyy/Pocsuite
    def do_loaded(self, args):
        registerPocFromDict()

        graph = PrettyTable(["pocId", "loadedPocsName"])
        graph.align["LoadedPocsName"] = "m"
        graph.padding_width = 1
        count = 0

        if hasattr(kb, 'registeredPocs') and getattr(kb, 'registeredPocs'):
            for poc in sorted(kb.registeredPocs.keys()):
                count += 1
                graph.add_row([count, poc])
        else:
            graph.add_row(["0", "None"])
        print graph
        print