diff --git a/lib/core/option.py b/lib/core/option.py index 188a98518..599f0bfd5 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -493,8 +493,6 @@ def __setHTTPProxy(): if not conf.proxy: return - parseTargetUrl() - debugMsg = "setting the HTTP proxy to pass by all HTTP requests" logger.debug(debugMsg) @@ -516,8 +514,8 @@ def __setHTTPProxy(): # Workaround for http://bugs.python.org/issue1424152 (urllib/urllib2: # HTTPS over (Squid) Proxy fails) as long as HTTP over SSL requests - # can't be tunneled over an HTTP proxy natively by Python urllib2 - # standard library + # can't be tunneled over an HTTP proxy natively by Python (<= 2.5) + # urllib2 standard library if conf.scheme == "https": proxyHandler = ProxyHTTPSHandler(__proxyString) else: @@ -545,8 +543,6 @@ def __setHTTPAuthentication(): errMsg += "but did not provide the type" raise sqlmapSyntaxException, errMsg - parseTargetUrl() - debugMsg = "setting the HTTP Authentication type and credentials" logger.debug(debugMsg) @@ -599,9 +595,8 @@ def __setHTTPMethod(): def __setHTTPExtraHeaders(): - parseTargetUrl() - - conf.httpHeaders.append(("Host", conf.hostname)) + if conf.hostname: + conf.httpHeaders.append(("Host", conf.hostname)) if conf.headers: debugMsg = "setting extra HTTP headers" @@ -987,6 +982,9 @@ def init(inputOptions=advancedDict()): __setConfAttributes() __setKnowledgeBaseAttributes() __cleanupOptions() + + parseTargetUrl() + __setHTTPTimeout() __setHTTPCookies() __setHTTPReferer() diff --git a/lib/core/update.py b/lib/core/update.py index 46599d447..099ca0c98 100644 --- a/lib/core/update.py +++ b/lib/core/update.py @@ -109,12 +109,15 @@ def __updateMSSQLXML(): servicePack = servicePack[:servicePack.index("-")] if "*" in servicePack: servicePack = servicePack[:servicePack.index("*")] + if servicePack.startswith("+"): + servicePack = "0%s" % servicePack servicePack = servicePack.replace("\t", " ") servicePack = servicePack.replace(" ", " ") servicePack = servicePack.replace("No SP", "0") servicePack = servicePack.replace("RTM", "0") servicePack = servicePack.replace("SP", "") + servicePack = servicePack.replace("Service Pack", "") servicePack = servicePack.replace(" - 10.0.2531 + 10.00.2714 - 0 + Service Pack 1 + 1 + Cumulative Update 2 for Service Pack 1 - 10.0.1798.0 + 10.00.2710 + + + 1 + Cumulative Update 1 for Service Pack 1 + + + + + 10.00.2531 + + + 1 + + + + + 10.00.1798 0 + Cumulative Update 4 @@ -51,7 +67,7 @@ - 10.0.1600.22 + 10.00.1600.22 0 @@ -83,6 +99,22 @@ + + + 9.00.4220 + + + 3+Q967909 + + + + + 9.00.4216 + + + 3+Q967101 + + 9.00.4211