mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-15 12:19:03 +00:00
code cleanup
This commit is contained in:
@@ -559,7 +559,7 @@ class Agent:
|
||||
inbandQuery = self.prefixQuery("UNION ALL SELECT ", prefix=prefix)
|
||||
|
||||
if limited:
|
||||
inbandQuery += ",".join(map(lambda x: char if x != position else '(SELECT %s)' % query, xrange(0, count)))
|
||||
inbandQuery += ",".join(char if _ != position else '(SELECT %s)' % query for _ in xrange(0, count))
|
||||
inbandQuery += FROM_TABLE.get(Backend.getIdentifiedDbms(), "")
|
||||
inbandQuery = self.suffixQuery(inbandQuery, comment, suffix)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -9,8 +9,6 @@ See the file 'doc/COPYING' for copying permission
|
||||
|
||||
import logging
|
||||
import os
|
||||
import _socket
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
Reference in New Issue
Block a user