MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / intersect

Function intersect

lib/core/common.py:4086–4106  ·  view source on GitHub ↗

Returns intersection of the container-ized values >>> intersect([1, 2, 3], set([1,3])) [1, 3]

(containerA, containerB, lowerCase=False)

Source from the content-addressed store, hash-verified

4084 return retVal
4085
4086def intersect(containerA, containerB, lowerCase=False):
4087 """
4088 Returns intersection of the container-ized values
4089
4090 >>> intersect([1, 2, 3], set([1,3]))
4091 [1, 3]
4092 """
4093
4094 retVal = []
4095
4096 if containerA and containerB:
4097 containerA = arrayizeValue(containerA)
4098 containerB = arrayizeValue(containerB)
4099
4100 if lowerCase:
4101 containerA = [val.lower() if hasattr(val, "lower") else val for val in containerA]
4102 containerB = [val.lower() if hasattr(val, "lower") else val for val in containerB]
4103
4104 retVal = [val for val in containerA if val in containerB]
4105
4106 return retVal
4107
4108def decodeStringEscape(value):
4109 """

Callers 8

startFunction · 0.90
checkSqlInjectionFunction · 0.90
_basicOptionValidationFunction · 0.90
_setRequestParamsFunction · 0.90
_resumeHashDBValuesFunction · 0.90
paramToDictFunction · 0.85
parseTargetUrlFunction · 0.85
priorityFunctionFunction · 0.85

Calls 1

arrayizeValueFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…