mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
Minor style update
This commit is contained in:
parent
eb14f296f6
commit
34ed2c51ac
|
@ -18,7 +18,7 @@ from lib.core.enums import OS
|
|||
from thirdparty.six import unichr as _unichr
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.7.21"
|
||||
VERSION = "1.3.7.22"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
@ -88,33 +88,32 @@ def cmdLineParser(argv=None):
|
|||
parser = ArgumentParser(usage=usage)
|
||||
|
||||
try:
|
||||
parser.add_argument("--hh", dest="advancedHelp",
|
||||
action="store_true",
|
||||
parser.add_argument("--hh", dest="advancedHelp", action="store_true",
|
||||
help="Show advanced help message and exit")
|
||||
|
||||
parser.add_argument("--version", dest="showVersion",
|
||||
action="store_true",
|
||||
parser.add_argument("--version", dest="showVersion", action="store_true",
|
||||
help="Show program's version number and exit")
|
||||
|
||||
parser.add_argument("-v", dest="verbose", type=int,
|
||||
help="Verbosity level: 0-6 (default %d)" % defaults.verbose)
|
||||
|
||||
# Target options
|
||||
target = parser.add_argument_group("Target", "At least one of these "
|
||||
"options has to be provided to define the target(s)")
|
||||
target = parser.add_argument_group("Target", "At least one of these options has to be provided to define the target(s)")
|
||||
|
||||
target.add_argument("-d", dest="direct", help="Connection string "
|
||||
"for direct database connection")
|
||||
target.add_argument("-d", dest="direct",
|
||||
help="Connection string for direct database connection")
|
||||
|
||||
target.add_argument("-u", "--url", dest="url", help="Target URL (e.g. \"http://www.site.com/vuln.php?id=1\")")
|
||||
target.add_argument("-u", "--url", dest="url",
|
||||
help="Target URL (e.g. \"http://www.site.com/vuln.php?id=1\")")
|
||||
|
||||
target.add_argument("-l", dest="logFile", help="Parse target(s) from Burp "
|
||||
"or WebScarab proxy log file")
|
||||
target.add_argument("-l", dest="logFile",
|
||||
help="Parse target(s) from Burp or WebScarab proxy log file")
|
||||
|
||||
target.add_argument("-x", dest="sitemapUrl", help="Parse target(s) from remote sitemap(.xml) file")
|
||||
target.add_argument("-x", dest="sitemapUrl",
|
||||
help="Parse target(s) from remote sitemap(.xml) file")
|
||||
|
||||
target.add_argument("-m", dest="bulkFile", help="Scan multiple targets given "
|
||||
"in a textual file ")
|
||||
target.add_argument("-m", dest="bulkFile",
|
||||
help="Scan multiple targets given in a textual file ")
|
||||
|
||||
target.add_argument("-r", dest="requestFile",
|
||||
help="Load HTTP request from a file")
|
||||
|
@ -126,8 +125,7 @@ def cmdLineParser(argv=None):
|
|||
help="Load options from a configuration INI file")
|
||||
|
||||
# Request options
|
||||
request = parser.add_argument_group("Request", "These options can be used "
|
||||
"to specify how to connect to the target URL")
|
||||
request = parser.add_argument_group("Request", "These options can be used to specify how to connect to the target URL")
|
||||
|
||||
request.add_argument("--method", dest="method",
|
||||
help="Force usage of given HTTP method (e.g. PUT)")
|
||||
|
@ -271,8 +269,7 @@ def cmdLineParser(argv=None):
|
|||
help="Retrieve page length without actual HTTP response body")
|
||||
|
||||
optimization.add_argument("--threads", dest="threads", type=int,
|
||||
help="Max number of concurrent HTTP(s) "
|
||||
"requests (default %d)" % defaults.threads)
|
||||
help="Max number of concurrent HTTP(s) requests (default %d)" % defaults.threads)
|
||||
|
||||
# Injection options
|
||||
injection = parser.add_argument_group("Injection", "These options can be used to specify which parameters to test for, provide custom injection payloads and optional tampering scripts")
|
||||
|
@ -718,12 +715,10 @@ def cmdLineParser(argv=None):
|
|||
|
||||
# Hidden and/or experimental options
|
||||
parser.add_argument("--base64", dest="base64Parameter",
|
||||
help=SUPPRESS)
|
||||
# help="Parameter(s) containing Base64 encoded values")
|
||||
help=SUPPRESS) # "Parameter(s) containing Base64 encoded values"
|
||||
|
||||
parser.add_argument("--crack", dest="hashFile",
|
||||
help=SUPPRESS)
|
||||
# help="Load and crack hashes from a file (standalone)")
|
||||
help=SUPPRESS) # "Load and crack hashes from a file (standalone)"
|
||||
|
||||
parser.add_argument("--dummy", dest="dummy", action="store_true",
|
||||
help=SUPPRESS)
|
||||
|
@ -764,15 +759,18 @@ def cmdLineParser(argv=None):
|
|||
parser.add_argument("--stop-fail", dest="stopFail", action="store_true",
|
||||
help=SUPPRESS)
|
||||
|
||||
parser.add_argument("--run-case", dest="runCase", help=SUPPRESS)
|
||||
parser.add_argument("--run-case", dest="runCase",
|
||||
help=SUPPRESS)
|
||||
|
||||
# API options
|
||||
parser.add_argument("--api", dest="api", action="store_true",
|
||||
help=SUPPRESS)
|
||||
|
||||
parser.add_argument("--taskid", dest="taskid", help=SUPPRESS)
|
||||
parser.add_argument("--taskid", dest="taskid",
|
||||
help=SUPPRESS)
|
||||
|
||||
parser.add_argument("--database", dest="database", help=SUPPRESS)
|
||||
parser.add_argument("--database", dest="database",
|
||||
help=SUPPRESS)
|
||||
|
||||
# Dirty hack to display longer options without breaking into two lines
|
||||
if hasattr(parser, "formatter"):
|
||||
|
@ -805,7 +803,7 @@ def cmdLineParser(argv=None):
|
|||
action.option_strings = ["-hh"]
|
||||
break
|
||||
|
||||
## Dirty hack for inherent help message of switch '-h'
|
||||
# Dirty hack for inherent help message of switch '-h'
|
||||
if hasattr(parser, "get_option"):
|
||||
option = parser.get_option("-h")
|
||||
option.help = option.help.capitalize().replace("this help", "basic help")
|
||||
|
|
|
@ -82,7 +82,7 @@ class ReqHandler(_BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
name = match.group(1)
|
||||
_ = getattr(self, "_%s" % name.lower(), None)
|
||||
if _:
|
||||
content = self._format(content, **{ name: _() })
|
||||
content = self._format(content, **{name: _()})
|
||||
|
||||
if "gzip" in self.headers.get(HTTP_HEADER.ACCEPT_ENCODING):
|
||||
self.send_header(HTTP_HEADER.CONTENT_ENCODING, "gzip")
|
||||
|
|
Loading…
Reference in New Issue
Block a user