當前位置: 首頁>>代碼示例>>Python>>正文


Python cmdline.cmdLineParser方法代碼示例

本文整理匯總了Python中lib.parse.cmdline.cmdLineParser方法的典型用法代碼示例。如果您正苦於以下問題:Python cmdline.cmdLineParser方法的具體用法?Python cmdline.cmdLineParser怎麽用?Python cmdline.cmdLineParser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在lib.parse.cmdline的用法示例。


在下文中一共展示了cmdline.cmdLineParser方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: initCase

# 需要導入模塊: from lib.parse import cmdline [as 別名]
# 或者: from lib.parse.cmdline import cmdLineParser [as 別名]
def initCase(switches, count):
    Failures.failedItems = []
    Failures.failedParseOn = None
    Failures.failedTraceBack = None

    paths.SQLMAP_OUTPUT_PATH = tempfile.mkdtemp(prefix="sqlmaptest-%d-" % count)
    paths.SQLMAP_DUMP_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "dump")
    paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")

    logger.debug("using output directory '%s' for this test case" % paths.SQLMAP_OUTPUT_PATH)

    LOGGER_HANDLER.stream = sys.stdout = tempfile.SpooledTemporaryFile(max_size=0, mode="w+b", prefix="sqlmapstdout-")

    cmdLineOptions = cmdLineParser()

    if switches:
        for key, value in switches.items():
            if key in cmdLineOptions.__dict__:
                cmdLineOptions.__dict__[key] = value

    initOptions(cmdLineOptions, True)
    init() 
開發者ID:krintoxi,項目名稱:NoobSec-Toolkit,代碼行數:24,代碼來源:testing.py

示例2: main

# 需要導入模塊: from lib.parse import cmdline [as 別名]
# 或者: from lib.parse.cmdline import cmdLineParser [as 別名]
def main():
    """
    main fuction of dirmap 
    """

    # anyway output thr banner information
    banner() 

    # set paths of project 
    paths.ROOT_PATH = os.getcwd() 
    setPaths()
    
    # received command >> cmdLineOptions
    cmdLineOptions.update(cmdLineParser().__dict__)
    
    # loader script,target,working way(threads? gevent?),output_file from cmdLineOptions
    # and send it to conf
    initOptions(cmdLineOptions) 

    # run!
    run() 
開發者ID:H4ckForJob,項目名稱:dirmap,代碼行數:23,代碼來源:dirmap.py

示例3: main

# 需要導入模塊: from lib.parse import cmdline [as 別名]
# 或者: from lib.parse.cmdline import cmdLineParser [as 別名]
def main():
    """
    Main function of sqlmap when running from command line.
    """

    paths.SQLMAP_ROOT_PATH = modulePath()
    setPaths()

    banner()
    cmdLineOptions = cmdLineParser()

    print "[*] starting at: %s\n" % time.strftime("%X")

    try:
        init(cmdLineOptions)

        if conf.start:
            start()

    except exceptionsTuple, e:
        logger.error(e) 
開發者ID:tuwid,項目名稱:darkc0de-old-stuff,代碼行數:23,代碼來源:sqlmap.py

示例4: initCase

# 需要導入模塊: from lib.parse import cmdline [as 別名]
# 或者: from lib.parse.cmdline import cmdLineParser [as 別名]
def initCase(switches, count):
    _failures.failedItems = []
    _failures.failedParseOn = None
    _failures.failedTraceBack = None

    paths.SQLMAP_OUTPUT_PATH = tempfile.mkdtemp(prefix="%s%d-" % (MKSTEMP_PREFIX.TESTING, count))
    paths.SQLMAP_DUMP_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "dump")
    paths.SQLMAP_FILES_PATH = os.path.join(paths.SQLMAP_OUTPUT_PATH, "%s", "files")

    logger.debug("using output directory '%s' for this test case" % paths.SQLMAP_OUTPUT_PATH)

    LOGGER_HANDLER.stream = sys.stdout = tempfile.SpooledTemporaryFile(max_size=0, mode="w+b", prefix="sqlmapstdout-")

    cmdLineOptions = cmdLineParser()

    if switches:
        for key, value in switches.items():
            if key in cmdLineOptions.__dict__:
                cmdLineOptions.__dict__[key] = value

    initOptions(cmdLineOptions, True)
    init() 
開發者ID:sabri-zaki,項目名稱:EasY_HaCk,代碼行數:24,代碼來源:testing.py

示例5: main

# 需要導入模塊: from lib.parse import cmdline [as 別名]
# 或者: from lib.parse.cmdline import cmdLineParser [as 別名]
def main():
    """
    Fungsi utama untuk menjalankan brutemap di terminal
    """

    printBanner()

    show_exit_msg = True

    try:
        initOptions(cmdLineParser())
        printStatus()
        initialize()

    except SystemExit:
        print()
        show_exit_msg = False

    except BrutemapQuitException:
        pass

    finally:
        if show_exit_msg:
            printStatus(start=False)

    if IS_WINDOWS:
        stdoutWrite("[#] Press any key to continue... ")
        raw_input() 
開發者ID:brutemap-dev,項目名稱:brutemap,代碼行數:30,代碼來源:brutemap.py


注:本文中的lib.parse.cmdline.cmdLineParser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。