Major bug fix to correctly handle httplib.BadStatusLine exception.

Minor improvement to set by default in all HTTP requests the standard HTTP headers (Accept, Accept-Encoding, etc.)
Updated user's manual.
This commit is contained in:
Bernardo Damele
2008-11-15 12:25:19 +00:00
parent 4bf1fcb8ec
commit 84cbc60659
5 changed files with 399 additions and 313 deletions

View File

@@ -278,6 +278,13 @@ def __setHTTPMethod():
conf.method = "GET"
def __setHTTPStandardHeaders():
conf.httpHeaders.append(("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"))
conf.httpHeaders.append(("Accept-Language", "en-us,en;q=0.5"))
conf.httpHeaders.append(("Accept-Encoding", "gzip,deflate"))
conf.httpHeaders.append(("Accept-Charset", "ISO-8859-15,utf-8;q=0.7,*;q=0.7"))
def __defaultHTTPUserAgent():
"""
@return: default sqlmap HTTP User-Agent header
@@ -566,6 +573,7 @@ def init(inputOptions=advancedDict()):
__setHTTPCookies()
__setHTTPReferer()
__setHTTPUserAgent()
__setHTTPStandardHeaders()
__setHTTPMethod()
__setHTTPAuthentication()
__setHTTPProxy()