mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-08 15:13:16 +03:00
minor lower/upper case fix
This commit is contained in:
parent
9be89422da
commit
08e0eb9b61
|
@ -394,8 +394,12 @@ def start():
|
||||||
# Test Cookie header only if --level >= 2
|
# Test Cookie header only if --level >= 2
|
||||||
skip |= (place == PLACE.COOKIE and conf.level < 2)
|
skip |= (place == PLACE.COOKIE and conf.level < 2)
|
||||||
|
|
||||||
skip &= not (place == PLACE.UA and intersect(USER_AGENT_ALIASES, conf.testParameter))
|
skip |= (place == PLACE.UA and intersect(USER_AGENT_ALIASES, conf.skip, True) not in ([], None))
|
||||||
skip &= not (place == PLACE.REFERER and intersect(REFERER_ALIASES, conf.testParameter))
|
skip |= (place == PLACE.REFERER and intersect(REFERER_ALIASES, conf.skip, True) not in ([], None))
|
||||||
|
skip |= (place == PLACE.COOKIE and intersect('cookie', conf.skip, True) not in ([], None))
|
||||||
|
|
||||||
|
skip &= not (place == PLACE.UA and intersect(USER_AGENT_ALIASES, conf.testParameter, True))
|
||||||
|
skip &= not (place == PLACE.REFERER and intersect(REFERER_ALIASES, conf.testParameter, True))
|
||||||
|
|
||||||
if skip:
|
if skip:
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -2679,7 +2679,7 @@ def getExceptionFrameLocals():
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
def intersect(valueA, valueB):
|
def intersect(valueA, valueB, lowerCase=False):
|
||||||
"""
|
"""
|
||||||
Returns intersection of the array-ized values
|
Returns intersection of the array-ized values
|
||||||
"""
|
"""
|
||||||
|
@ -2687,7 +2687,14 @@ def intersect(valueA, valueB):
|
||||||
retVal = None
|
retVal = None
|
||||||
|
|
||||||
if valueA and valueB:
|
if valueA and valueB:
|
||||||
retVal = [val for val in arrayizeValue(valueA) if val in arrayizeValue(valueB)]
|
valueA = arrayizeValue(valueA)
|
||||||
|
valueB = arrayizeValue(valueB)
|
||||||
|
|
||||||
|
if lowerCase:
|
||||||
|
valueA = [val.lower() if isinstance(val, basestring) else val for val in valueA]
|
||||||
|
valueB = [val.lower() if isinstance(val, basestring) else val for val in valueB]
|
||||||
|
|
||||||
|
retVal = [val for val in valueA if val in valueB]
|
||||||
|
|
||||||
return retVal
|
return retVal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user