mirror of
				https://github.com/sqlmapproject/sqlmap.git
				synced 2025-10-31 16:07:55 +03:00 
			
		
		
		
	Proper patch for #3955
This commit is contained in:
		
							parent
							
								
									9b42319d0e
								
							
						
					
					
						commit
						627d99089f
					
				|  | @ -467,7 +467,7 @@ def _findPageForms(): | |||
|     logger.info(infoMsg) | ||||
| 
 | ||||
|     if not any((conf.bulkFile, conf.googleDork, conf.sitemapUrl)): | ||||
|         page, _, _ = Request.queryPage(content=True) | ||||
|         page, _, _ = Request.queryPage(content=True, ignoreSecondOrder=True) | ||||
|         if findPageForms(page, conf.url, True, True): | ||||
|             found = True | ||||
|     else: | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ from lib.core.enums import OS | |||
| from thirdparty.six import unichr as _unichr | ||||
| 
 | ||||
| # sqlmap version (<major>.<minor>.<month>.<monthly commit>) | ||||
| VERSION = "1.3.10.9" | ||||
| VERSION = "1.3.10.10" | ||||
| TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" | ||||
| TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} | ||||
| VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) | ||||
|  |  | |||
|  | @ -839,7 +839,7 @@ class Connect(object): | |||
| 
 | ||||
|     @staticmethod | ||||
|     @stackedmethod | ||||
|     def queryPage(value=None, place=None, content=False, getRatioValue=False, silent=False, method=None, timeBasedCompare=False, noteResponseTime=True, auxHeaders=None, response=False, raise404=None, removeReflection=True, disableTampering=False): | ||||
|     def queryPage(value=None, place=None, content=False, getRatioValue=False, silent=False, method=None, timeBasedCompare=False, noteResponseTime=True, auxHeaders=None, response=False, raise404=None, removeReflection=True, disableTampering=False, ignoreSecondOrder=False): | ||||
|         """ | ||||
|         This method calls a function to get the target URL page content | ||||
|         and returns its page ratio (0 <= ratio <= 1) or a boolean value | ||||
|  | @ -1339,17 +1339,18 @@ class Connect(object): | |||
|                     warnMsg += "behavior in custom WAF/IPS solutions" | ||||
|                 singleTimeWarnMessage(warnMsg) | ||||
| 
 | ||||
|         if conf.secondUrl: | ||||
|             page, headers, code = Connect.getPage(url=conf.secondUrl, cookie=cookie, ua=ua, silent=silent, auxHeaders=auxHeaders, response=response, raise404=False, ignoreTimeout=timeBasedCompare, refreshing=True) | ||||
|         elif kb.secondReq and IPS_WAF_CHECK_PAYLOAD not in _urllib.parse.unquote(value or ""): | ||||
|             def _(value): | ||||
|                 if kb.customInjectionMark in (value or ""): | ||||
|                     if payload is None: | ||||
|                         value = value.replace(kb.customInjectionMark, "") | ||||
|                     else: | ||||
|                         value = re.sub(r"\w*%s" % re.escape(kb.customInjectionMark), payload, value) | ||||
|                 return value | ||||
|             page, headers, code = Connect.getPage(url=_(kb.secondReq[0]), post=_(kb.secondReq[2]), method=kb.secondReq[1], cookie=kb.secondReq[3], silent=silent, auxHeaders=dict(auxHeaders, **dict(kb.secondReq[4])), response=response, raise404=False, ignoreTimeout=timeBasedCompare, refreshing=True) | ||||
|         if not ignoreSecondOrder: | ||||
|             if conf.secondUrl: | ||||
|                 page, headers, code = Connect.getPage(url=conf.secondUrl, cookie=cookie, ua=ua, silent=silent, auxHeaders=auxHeaders, response=response, raise404=False, ignoreTimeout=timeBasedCompare, refreshing=True) | ||||
|             elif kb.secondReq and IPS_WAF_CHECK_PAYLOAD not in _urllib.parse.unquote(value or ""): | ||||
|                 def _(value): | ||||
|                     if kb.customInjectionMark in (value or ""): | ||||
|                         if payload is None: | ||||
|                             value = value.replace(kb.customInjectionMark, "") | ||||
|                         else: | ||||
|                             value = re.sub(r"\w*%s" % re.escape(kb.customInjectionMark), payload, value) | ||||
|                     return value | ||||
|                 page, headers, code = Connect.getPage(url=_(kb.secondReq[0]), post=_(kb.secondReq[2]), method=kb.secondReq[1], cookie=kb.secondReq[3], silent=silent, auxHeaders=dict(auxHeaders, **dict(kb.secondReq[4])), response=response, raise404=False, ignoreTimeout=timeBasedCompare, refreshing=True) | ||||
| 
 | ||||
|         threadData.lastQueryDuration = calculateDeltaSeconds(start) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user