@@ -89,7 +89,7 @@ def __urllib2Opener():
8989
9090 debugMsg = "creating HTTP requests opener object"
9191 logger .debug (debugMsg )
92-
92+
9393 handlers = [proxyHandler , authHandler , redirectHandler ]
9494
9595 if not conf .dropSetCookie :
@@ -258,11 +258,11 @@ def __setRequestFromFile():
258258
259259 if not conf .requestFile :
260260 return
261-
261+
262262 addedTargetUrls = set ()
263263
264264 conf .requestFile = os .path .expanduser (conf .requestFile )
265-
265+
266266 infoMsg = "parsing HTTP request from '%s'" % conf .requestFile
267267 logger .info (infoMsg )
268268
@@ -272,7 +272,7 @@ def __setRequestFromFile():
272272 raise sqlmapFilePathException , errMsg
273273
274274 __feedTargetsDict (conf .requestFile , addedTargetUrls )
275-
275+
276276def __setGoogleDorking ():
277277 """
278278 This function checks if the way to request testable hosts is through
@@ -657,13 +657,13 @@ def __setHTTPAuthentication():
657657
658658 authUsername = aCredRegExp .group (1 )
659659 authPassword = aCredRegExp .group (2 )
660-
660+
661661 passwordMgr = urllib2 .HTTPPasswordMgrWithDefaultRealm ()
662662 passwordMgr .add_password (None , "%s://%s" % (conf .scheme , conf .hostname ), authUsername , authPassword )
663-
663+
664664 if aTypeLower == "basic" :
665665 authHandler = urllib2 .HTTPBasicAuthHandler (passwordMgr )
666-
666+
667667 elif aTypeLower == "digest" :
668668 authHandler = urllib2 .HTTPDigestAuthHandler (passwordMgr )
669669
@@ -675,28 +675,28 @@ def __setHTTPAuthentication():
675675 errMsg += "in order to authenticate via NTLM, "
676676 errMsg += "http://code.google.com/p/python-ntlm/"
677677 raise sqlmapMissingDependence , errMsg
678-
678+
679679 authHandler = HTTPNtlmAuthHandler .HTTPNtlmAuthHandler (passwordMgr )
680680 else :
681681 debugMsg = "setting the HTTP(s) authentication certificate"
682682 logger .debug (debugMsg )
683-
683+
684684 aCertRegExp = re .search ("^(.+?),\s*(.+?)$" , conf .aCert )
685-
685+
686686 if not aCertRegExp :
687687 errMsg = "HTTP authentication certificate option "
688688 errMsg += "must be in format key_file,cert_file"
689689 raise sqlmapSyntaxException , errMsg
690-
690+
691691 #os.path.expanduser for support of paths with ~
692692 key_file = os .path .expanduser (aCertRegExp .group (1 ))
693693 cert_file = os .path .expanduser (aCertRegExp .group (2 ))
694-
694+
695695 for ifile in (key_file , cert_file ):
696696 if not os .path .exists (ifile ):
697697 errMsg = "File '%s' does not exist" % ifile
698698 raise sqlmapSyntaxException , errMsg
699-
699+
700700 authHandler = HTTPSCertAuthHandler (key_file , cert_file )
701701
702702def __setHTTPMethod ():
@@ -1011,6 +1011,7 @@ def __setKnowledgeBaseAttributes():
10111011 kb .resumedQueries = {}
10121012 kb .stackedTest = None
10131013 kb .targetUrls = set ()
1014+ kb .testedParams = set ()
10141015 kb .timeTest = None
10151016 kb .unionComment = ""
10161017 kb .unionCount = None
@@ -1129,7 +1130,7 @@ def __basicOptionValidation():
11291130 conf .limitStop is not None and isinstance (conf .limitStop , int ) and conf .limitStop > 0 and conf .limitStop <= conf .limitStart :
11301131 errMsg = "value for --start (limitStart) option must be smaller than value for --stop (limitStop) option"
11311132 raise sqlmapSyntaxException , errMsg
1132-
1133+
11331134 if conf .cpuThrottle is not None and isinstance (conf .cpuThrottle , int ) and (conf .cpuThrottle > 100 or \
11341135 conf .cpuThrottle < 0 ):
11351136 errMsg = "value for --cpu-throttle (cpuThrottle) option must be in range [0,100]"
0 commit comments