@@ -1317,7 +1317,7 @@ def parseTargetDirect():
13171317 remote = False
13181318
13191319 for dbms in SUPPORTED_DBMS :
1320- details = re .search ("^(?P<dbms>%s)://(?P<credentials>(?P<user>.+?)\:(?P<pass>.*)\@)?(?P<remote>(?P<hostname>[\w.-]+?)\:(?P<port>[\d]+)\/)?(?P<db>[\w\d\ \:\.\_\-\/\\ \\ ]+?)$" % dbms , conf .direct , re .I )
1320+ details = re .search (r "^(?P<dbms>%s)://(?P<credentials>(?P<user>.+?)\:(?P<pass>.*)\@)?(?P<remote>(?P<hostname>[\w.-]+?)\:(?P<port>[\d]+)\/)?(?P<db>[\w\d\ \:\.\_\-\/\\]+?)$" % dbms , conf .direct , re .I )
13211321
13221322 if details :
13231323 conf .dbms = details .group ("dbms" )
@@ -1440,7 +1440,7 @@ def parseTargetUrl():
14401440 errMsg += "in the hostname part"
14411441 raise SqlmapGenericException (errMsg )
14421442
1443- hostnamePort = urlSplit .netloc .split (":" ) if not re .search (r"\[.+\]" , urlSplit .netloc ) else filter (None , (re .search ("\[.+\]" , urlSplit .netloc ).group (0 ), re .search (r"\](:(?P<port>\d+))?" , urlSplit .netloc ).group ("port" )))
1443+ hostnamePort = urlSplit .netloc .split (":" ) if not re .search (r"\[.+\]" , urlSplit .netloc ) else filter (None , (re .search (r "\[.+\]" , urlSplit .netloc ).group (0 ), re .search (r"\](:(?P<port>\d+))?" , urlSplit .netloc ).group ("port" )))
14441444
14451445 conf .scheme = (urlSplit .scheme .strip ().lower () or "http" ) if not conf .forceSSL else "https"
14461446 conf .path = urlSplit .path .strip ()
@@ -3355,7 +3355,7 @@ def createGithubIssue(errMsg, excMsg):
33553355
33563356 _ = re .sub (r"'[^']+'" , "''" , excMsg )
33573357 _ = re .sub (r"\s+line \d+" , "" , _ )
3358- _ = re .sub (r'File ".+?/(\w+\.py)' , "\g<1>" , _ )
3358+ _ = re .sub (r'File ".+?/(\w+\.py)' , r "\g<1>" , _ )
33593359 _ = re .sub (r".+\Z" , "" , _ )
33603360 key = hashlib .md5 (_ ).hexdigest ()[:8 ]
33613361
@@ -3522,6 +3522,7 @@ def _(value):
35223522 regex = r"%s\b" % regex
35233523
35243524 _retVal = [retVal ]
3525+
35253526 def _thread (regex ):
35263527 try :
35273528 _retVal [0 ] = re .sub (r"(?i)%s" % regex , REFLECTED_VALUE_MARKER , _retVal [0 ])
@@ -3957,6 +3958,7 @@ class _(StringIO):
39573958 def __init__ (self , content , url ):
39583959 StringIO .__init__ (self , unicodeencode (content , kb .pageEncoding ) if isinstance (content , unicode ) else content )
39593960 self ._url = url
3961+
39603962 def geturl (self ):
39613963 return self ._url
39623964
@@ -4082,7 +4084,7 @@ def getHostHeader(url):
40824084 retVal = urlparse .urlparse (url ).netloc
40834085
40844086 if re .search (r"http(s)?://\[.+\]" , url , re .I ):
4085- retVal = extractRegexResult ("http(s)?://\[(?P<result>.+)\]" , url )
4087+ retVal = extractRegexResult (r "http(s)?://\[(?P<result>.+)\]" , url )
40864088 elif any (retVal .endswith (':%d' % _ ) for _ in (80 , 443 )):
40874089 retVal = retVal .split (':' )[0 ]
40884090
@@ -4339,7 +4341,7 @@ def resetCookieJar(cookieJar):
43394341
43404342 except cookielib .LoadError , msg :
43414343 errMsg = "there was a problem loading "
4342- errMsg += "cookies file ('%s')" % re .sub (r"(cookies) file '[^']+'" , "\g<1>" , str (msg ))
4344+ errMsg += "cookies file ('%s')" % re .sub (r"(cookies) file '[^']+'" , r "\g<1>" , str (msg ))
43434345 raise SqlmapGenericException (errMsg )
43444346
43454347def decloakToTemp (filename ):
0 commit comments