mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-25 13:11:00 +03:00 
			
		
		
		
	Bug fix (port was not being used properly with Burp exported history)
This commit is contained in:
		
							parent
							
								
									1632bec10b
								
							
						
					
					
						commit
						15f92c4197
					
				|  | @ -234,7 +234,16 @@ def _feedTargetsDict(reqFile, addedTargetUrls): | |||
| 
 | ||||
|         if not re.search(BURP_REQUEST_REGEX, content, re.I | re.S): | ||||
|             if re.search(BURP_XML_HISTORY_REGEX, content, re.I | re.S): | ||||
|                 reqResList = [_.decode("base64") for _ in re.findall(BURP_XML_HISTORY_REGEX, content, re.I | re.S)] | ||||
|                 reqResList = [] | ||||
|                 for match in re.finditer(BURP_XML_HISTORY_REGEX, content, re.I | re.S): | ||||
|                     port, request = match.groups() | ||||
|                     request = request.decode("base64") | ||||
|                     _ = re.search(r"%s:.+" % HTTP_HEADER.HOST, request) | ||||
|                     if _: | ||||
|                         host = _.group(0).strip() | ||||
|                         if not re.search(r":\d+\Z", host): | ||||
|                             request = request.replace(host, "%s:%d" % (host, int(port))) | ||||
|                     reqResList.append(request) | ||||
|             else: | ||||
|                 reqResList = [content] | ||||
|         else: | ||||
|  |  | |||
|  | @ -266,7 +266,7 @@ WEBSCARAB_SPLITTER = "### Conversation" | |||
| BURP_REQUEST_REGEX = r"={10,}\s+[^=]+={10,}\s(.+?)\s={10,}" | ||||
| 
 | ||||
| # Regex used for parsing XML Burp saved history items | ||||
| BURP_XML_HISTORY_REGEX = r'<request base64="true"><!\[CDATA\[([^]]+)' | ||||
| BURP_XML_HISTORY_REGEX = r'<port>(\d+)</port>.+?<request base64="true"><!\[CDATA\[([^]]+)' | ||||
| 
 | ||||
| # Encoding used for Unicode data | ||||
| UNICODE_ENCODING = "utf8" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user