mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
Cosmetics
This commit is contained in:
parent
70cac24909
commit
0d8d6a4ace
|
@ -433,6 +433,7 @@ def __setGoogleDorking():
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
matches = search()
|
matches = search()
|
||||||
|
|
||||||
if kb.targetUrls:
|
if kb.targetUrls:
|
||||||
infoMsg = "sqlmap got %d results for your " % len(matches)
|
infoMsg = "sqlmap got %d results for your " % len(matches)
|
||||||
infoMsg += "Google dork expression, "
|
infoMsg += "Google dork expression, "
|
||||||
|
@ -450,7 +451,7 @@ def __setGoogleDorking():
|
||||||
message = "sqlmap got %d results " % len(matches)
|
message = "sqlmap got %d results " % len(matches)
|
||||||
message += "for your Google dork expression, but none of them "
|
message += "for your Google dork expression, but none of them "
|
||||||
message += "have GET parameters to test for SQL injection. "
|
message += "have GET parameters to test for SQL injection. "
|
||||||
message += "do you want to skip to the next result page? [Y/n]"
|
message += "Do you want to skip to the next result page? [Y/n]"
|
||||||
test = readInput(message, default="Y")
|
test = readInput(message, default="Y")
|
||||||
|
|
||||||
if test[0] in ("n", "N"):
|
if test[0] in ("n", "N"):
|
||||||
|
@ -473,9 +474,11 @@ def __setBulkMultipleTargets():
|
||||||
raise sqlmapFilePathException, errMsg
|
raise sqlmapFilePathException, errMsg
|
||||||
|
|
||||||
f = open(conf.bulkFile, 'r')
|
f = open(conf.bulkFile, 'r')
|
||||||
|
|
||||||
for line in f.xreadlines():
|
for line in f.xreadlines():
|
||||||
if re.search(r"[^ ]+\?(.+)", line, re.I):
|
if re.search(r"[^ ]+\?(.+)", line, re.I):
|
||||||
kb.targetUrls.add((line, None, None, None))
|
kb.targetUrls.add((line, None, None, None))
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
def __findPageForms():
|
def __findPageForms():
|
||||||
|
@ -1627,11 +1630,10 @@ def __setTorProxySettings():
|
||||||
conf.proxy = "http://%s:%d" % (LOCALHOST, found)
|
conf.proxy = "http://%s:%d" % (LOCALHOST, found)
|
||||||
else:
|
else:
|
||||||
errMsg = "can't establish connection with the Tor proxy. "
|
errMsg = "can't establish connection with the Tor proxy. "
|
||||||
errMsg += "please make sure that you have "
|
errMsg += "Please make sure that you have Vidalia, Privoxy or "
|
||||||
errMsg += "some kind of Vidalia/Privoxy/Polipo "
|
errMsg += "Polipo bundle installed for you to be able to "
|
||||||
errMsg += "Tor proxy bundle installed for "
|
errMsg += "successfully use --tor switch "
|
||||||
errMsg += "you to be able to successfully use "
|
|
||||||
errMsg += "--tor switch "
|
|
||||||
if IS_WIN:
|
if IS_WIN:
|
||||||
errMsg += "(e.g. https://www.torproject.org/projects/vidalia.html.en)"
|
errMsg += "(e.g. https://www.torproject.org/projects/vidalia.html.en)"
|
||||||
else:
|
else:
|
||||||
|
@ -1714,9 +1716,9 @@ def __basicOptionValidation():
|
||||||
try:
|
try:
|
||||||
codecs.lookup(conf.charset)
|
codecs.lookup(conf.charset)
|
||||||
except LookupError:
|
except LookupError:
|
||||||
errMsg = "unknown charset '%s'. please visit page " % conf.charset
|
errMsg = "unknown charset '%s'. Please visit " % conf.charset
|
||||||
errMsg += "'%s' " % CODECS_LIST_PAGE
|
errMsg += "'%s' to get the full list of " % CODECS_LIST_PAGE
|
||||||
errMsg += "to get the full list of supported charsets"
|
errMsg += "supported charsets"
|
||||||
raise sqlmapSyntaxException, errMsg
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
||||||
def __resolveCrossReferences():
|
def __resolveCrossReferences():
|
||||||
|
|
|
@ -66,7 +66,7 @@ def configFileParser(configFile):
|
||||||
config = UnicodeRawConfigParser()
|
config = UnicodeRawConfigParser()
|
||||||
config.readfp(configFP)
|
config.readfp(configFP)
|
||||||
except MissingSectionHeaderError:
|
except MissingSectionHeaderError:
|
||||||
errMsg = "you've provided a non-valid configuration file"
|
errMsg = "you have provided an invalid configuration file"
|
||||||
raise sqlmapSyntaxException, errMsg
|
raise sqlmapSyntaxException, errMsg
|
||||||
|
|
||||||
if not config.has_section("Target"):
|
if not config.has_section("Target"):
|
||||||
|
|
|
@ -254,7 +254,7 @@ class Connect:
|
||||||
|
|
||||||
if kb.alwaysRedirect is None:
|
if kb.alwaysRedirect is None:
|
||||||
msg = "sqlmap got a %d redirect to " % conn.redcode
|
msg = "sqlmap got a %d redirect to " % conn.redcode
|
||||||
msg += "'%s'. do you want to follow redirects " % conn.redurl
|
msg += "'%s'. Do you want to follow redirects " % conn.redurl
|
||||||
msg += "from now on (or stay on the original page)? [Y/n]"
|
msg += "from now on (or stay on the original page)? [Y/n]"
|
||||||
choice = readInput(msg, default="Y")
|
choice = readInput(msg, default="Y")
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ class Connect:
|
||||||
if kb.alwaysRefresh is None:
|
if kb.alwaysRefresh is None:
|
||||||
msg = "sqlmap got a refresh request "
|
msg = "sqlmap got a refresh request "
|
||||||
msg += "(redirect like response common to login pages). "
|
msg += "(redirect like response common to login pages). "
|
||||||
msg += "do you want to apply the refresh "
|
msg += "Do you want to apply the refresh "
|
||||||
msg += "from now on (or stay on the original page)? [Y/n]"
|
msg += "from now on (or stay on the original page)? [Y/n]"
|
||||||
choice = readInput(msg, default="Y")
|
choice = readInput(msg, default="Y")
|
||||||
|
|
||||||
|
|
|
@ -114,8 +114,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
|
||||||
numThreads = 1
|
numThreads = 1
|
||||||
|
|
||||||
if conf.threads == 1 and not timeBasedCompare:
|
if conf.threads == 1 and not timeBasedCompare:
|
||||||
warnMsg = "running in a single-thread mode. please consider usage of "
|
warnMsg = "running in a single-thread mode. Please consider to "
|
||||||
warnMsg += "--threads option to declare higher number of threads"
|
warnMsg += "provide --threads switch to speedup data fetching"
|
||||||
singleTimeWarnMessage(warnMsg)
|
singleTimeWarnMessage(warnMsg)
|
||||||
|
|
||||||
if conf.verbose in (1, 2) and not showEta:
|
if conf.verbose in (1, 2) and not showEta:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user