mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-01 18:33:12 +03:00
minor update regarding mnemonics
This commit is contained in:
parent
25b923bbc3
commit
17e4c6b564
|
@ -2653,7 +2653,7 @@ def expandMnemonics(mnemonics, parser, args):
|
||||||
|
|
||||||
if pointer in (None, head):
|
if pointer in (None, head):
|
||||||
errMsg = "mnemonic '%s' can't be resolved to any parameter name" % name
|
errMsg = "mnemonic '%s' can't be resolved to any parameter name" % name
|
||||||
logger.error(errMsg)
|
raise sqlmapSyntaxException, errMsg
|
||||||
elif len(pointer.current) > 1:
|
elif len(pointer.current) > 1:
|
||||||
options = {}
|
options = {}
|
||||||
for option in pointer.current:
|
for option in pointer.current:
|
||||||
|
@ -2678,5 +2678,8 @@ def expandMnemonics(mnemonics, parser, args):
|
||||||
value = found.convert_value(found, value)
|
value = found.convert_value(found, value)
|
||||||
if value is not None:
|
if value is not None:
|
||||||
setattr(args, found.dest, value)
|
setattr(args, found.dest, value)
|
||||||
else:
|
elif not found.type: # boolean
|
||||||
setattr(args, found.dest, True)
|
setattr(args, found.dest, True)
|
||||||
|
else:
|
||||||
|
errMsg = "mnemonic '%s' requires value of type '%s'" % (name, found.type)
|
||||||
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
20
sqlmap.py
20
sqlmap.py
|
@ -63,17 +63,17 @@ def main():
|
||||||
Main function of sqlmap when running from command line.
|
Main function of sqlmap when running from command line.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
paths.SQLMAP_ROOT_PATH = modulePath()
|
|
||||||
setPaths()
|
|
||||||
banner()
|
|
||||||
|
|
||||||
# Store original command line options for possible later restoration
|
|
||||||
cmdLineOptions.update(cmdLineParser().__dict__)
|
|
||||||
|
|
||||||
dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True)
|
|
||||||
dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True)
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
paths.SQLMAP_ROOT_PATH = modulePath()
|
||||||
|
setPaths()
|
||||||
|
banner()
|
||||||
|
|
||||||
|
# Store original command line options for possible later restoration
|
||||||
|
cmdLineOptions.update(cmdLineParser().__dict__)
|
||||||
|
|
||||||
|
dataToStdout("[!] legal disclaimer: %s\n\n" % LEGAL_DISCLAIMER, forceOutput=True)
|
||||||
|
dataToStdout("[*] starting at %s\n\n" % time.strftime("%X"), forceOutput=True)
|
||||||
|
|
||||||
init(cmdLineOptions)
|
init(cmdLineOptions)
|
||||||
if conf.profile:
|
if conf.profile:
|
||||||
profile()
|
profile()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user