本文整理匯總了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()