Merge branch 'master' of github.com:sqlmapproject/sqlmap

This commit is contained in:
Miroslav Stampar 2012-06-28 18:48:18 +02:00
commit 18b596ea75
4 changed files with 5 additions and 6 deletions

View File

@ -1154,14 +1154,14 @@ def __setHTTPUserAgent():
conf.httpHeaders.append(("User-Agent", conf.agent))
elif not conf.randomAgent:
addDefaultUserAgent = True
_ = True
for header, _ in conf.httpHeaders:
if header == "User-Agent":
addDefaultUserAgent = False
_ = False
break
if addDefaultUserAgent:
if _:
conf.httpHeaders.append(("User-Agent", __defaultHTTPUserAgent()))
else:

View File

@ -63,7 +63,7 @@ CHAR_INFERENCE_MARK = "%c"
PRINTABLE_CHAR_REGEX = r"[^\x00-\x1f\x7e-\xff]"
# regular expression used for extracting results from google search
GOOGLE_REGEX = r"url\?q=(http[^>]+)&sa=U&amp"
GOOGLE_REGEX = r"url\?\w+=(http[^>]+)&(sa=U|rct=j)"
# regular expression used for extracting content from "textual" tags
TEXT_TAG_REGEX = r"(?si)<(abbr|acronym|b|blockquote|br|center|cite|code|dt|em|font|h\d|i|li|p|pre|q|strong|sub|sup|td|th|title|tt|u)(?!\w).*?>(?P<result>[^<]+)"

View File

@ -46,7 +46,7 @@ class Google:
HTTP addresses
"""
retVal = re.findall(GOOGLE_REGEX, page, re.I | re.S)
retVal = [match.group(1) for match in re.finditer(GOOGLE_REGEX, page, re.I | re.S)]
return retVal

View File

@ -675,4 +675,3 @@ wizard = False
# 6: Show also HTTP responses' page content
# Default: 1
verbose = 1