本文整理汇总了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()
示例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()
示例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)
示例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()
示例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()