mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
code cleanup
This commit is contained in:
@@ -2346,15 +2346,12 @@ def findDynamicContent(firstPage, secondPage):
|
||||
kb.dynamicMarkings = []
|
||||
|
||||
# Removing too small matching blocks
|
||||
while block in blocks[:]:
|
||||
for block in blocks[:]:
|
||||
(_, _, length) = block
|
||||
|
||||
if length <= DYNAMICITY_MARK_LENGTH:
|
||||
blocks.remove(block)
|
||||
|
||||
else:
|
||||
i += 1
|
||||
|
||||
# Making of dynamic markings based on prefix/suffix principle
|
||||
if len(blocks) > 0:
|
||||
blocks.insert(0, None)
|
||||
@@ -2965,7 +2962,7 @@ def safeCSValue(value):
|
||||
|
||||
if retVal and isinstance(retVal, basestring):
|
||||
if not (retVal[0] == retVal[-1] == '"'):
|
||||
if any(map(lambda x: x in retVal, (conf.csvDel, '"', '\n'))):
|
||||
if any(_ in retVal for _ in (conf.csvDel, '"', '\n')):
|
||||
retVal = '"%s"' % retVal.replace('"', '""')
|
||||
|
||||
return retVal
|
||||
@@ -3124,7 +3121,7 @@ def findPageForms(content, url, raise_=False, addToTargets=False):
|
||||
def getHostHeader(url):
|
||||
retVal = urlparse.urlparse(url).netloc
|
||||
|
||||
if any(map(lambda x: retVal.endswith(':%d' % x), [80, 443])):
|
||||
if any(retVal.endswith(':%d' % _) for _ in [80, 443]):
|
||||
retVal = retVal.split(':')[0]
|
||||
|
||||
return retVal
|
||||
|
||||
Reference in New Issue
Block a user