Cosmetics

This commit is contained in:
Bernardo Damele 2011-06-08 16:08:20 +00:00
parent 70cac24909
commit 0d8d6a4ace
6 changed files with 18 additions and 16 deletions

View File

@ -433,6 +433,7 @@ def __setGoogleDorking():
while True:
matches = search()
if kb.targetUrls:
infoMsg = "sqlmap got %d results for your " % len(matches)
infoMsg += "Google dork expression, "
@ -450,7 +451,7 @@ def __setGoogleDorking():
message = "sqlmap got %d results " % len(matches)
message += "for your Google dork expression, but none of them "
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")
if test[0] in ("n", "N"):
@ -473,9 +474,11 @@ def __setBulkMultipleTargets():
raise sqlmapFilePathException, errMsg
f = open(conf.bulkFile, 'r')
for line in f.xreadlines():
if re.search(r"[^ ]+\?(.+)", line, re.I):
kb.targetUrls.add((line, None, None, None))
f.close()
def __findPageForms():
@ -1627,11 +1630,10 @@ def __setTorProxySettings():
conf.proxy = "http://%s:%d" % (LOCALHOST, found)
else:
errMsg = "can't establish connection with the Tor proxy. "
errMsg += "please make sure that you have "
errMsg += "some kind of Vidalia/Privoxy/Polipo "
errMsg += "Tor proxy bundle installed for "
errMsg += "you to be able to successfully use "
errMsg += "--tor switch "
errMsg += "Please make sure that you have Vidalia, Privoxy or "
errMsg += "Polipo bundle installed for you to be able to "
errMsg += "successfully use --tor switch "
if IS_WIN:
errMsg += "(e.g. https://www.torproject.org/projects/vidalia.html.en)"
else:
@ -1714,9 +1716,9 @@ def __basicOptionValidation():
try:
codecs.lookup(conf.charset)
except LookupError:
errMsg = "unknown charset '%s'. please visit page " % conf.charset
errMsg += "'%s' " % CODECS_LIST_PAGE
errMsg += "to get the full list of supported charsets"
errMsg = "unknown charset '%s'. Please visit " % conf.charset
errMsg += "'%s' to get the full list of " % CODECS_LIST_PAGE
errMsg += "supported charsets"
raise sqlmapSyntaxException, errMsg
def __resolveCrossReferences():

View File

@ -16,7 +16,7 @@ optDict = {
"direct": "string",
"url": "string",
"logFile": "string",
"bulkFile": "string",
"bulkFile": "string",
"requestFile": "string",
"googleDork": "string",
"configFile": "string"

View File

@ -53,7 +53,7 @@ def setInjection(inj):
or ( kb.resumedQueries[conf.url].has_key("Injection data")
and intersect(base64unpickle(kb.resumedQueries[conf.url]["Injection data"][:-1]).data.keys(),\
inj.data.keys()) != inj.data.keys()
) )
) )
if condition:
dataToSessionFile("[%s][%s][%s][Injection data][%s]\n" % (conf.url, inj.place, safeFormatString(conf.parameters[inj.place]), base64pickle(inj)))

View File

@ -66,7 +66,7 @@ def configFileParser(configFile):
config = UnicodeRawConfigParser()
config.readfp(configFP)
except MissingSectionHeaderError:
errMsg = "you've provided a non-valid configuration file"
errMsg = "you have provided an invalid configuration file"
raise sqlmapSyntaxException, errMsg
if not config.has_section("Target"):

View File

@ -254,7 +254,7 @@ class Connect:
if kb.alwaysRedirect is None:
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]"
choice = readInput(msg, default="Y")
@ -285,7 +285,7 @@ class Connect:
if kb.alwaysRefresh is None:
msg = "sqlmap got a refresh request "
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]"
choice = readInput(msg, default="Y")

View File

@ -114,8 +114,8 @@ def bisection(payload, expression, length=None, charsetType=None, firstChar=None
numThreads = 1
if conf.threads == 1 and not timeBasedCompare:
warnMsg = "running in a single-thread mode. please consider usage of "
warnMsg += "--threads option to declare higher number of threads"
warnMsg = "running in a single-thread mode. Please consider to "
warnMsg += "provide --threads switch to speedup data fetching"
singleTimeWarnMessage(warnMsg)
if conf.verbose in (1, 2) and not showEta: