当前位置: 首页>>代码示例>>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;未经允许,请勿转载。