@@ -309,7 +309,7 @@ def __init__(self, lineNumber, pageTotal, lineContentBefore, lineContentAfter):
309309class Format :
310310 @staticmethod
311311 def humanize (values , chain = " or " ):
312- strJoin = "|" .join ([ v for v in values ] )
312+ strJoin = "|" .join (v for v in values )
313313
314314 return strJoin .replace ("|" , chain )
315315
@@ -330,7 +330,7 @@ def getDbms(versions=None):
330330 if versions is None :
331331 return Backend .getDbms ()
332332 else :
333- return "%s %s" % (Backend .getDbms (), " and " .join ([ v for v in versions ] ))
333+ return "%s %s" % (Backend .getDbms (), " and " .join (v for v in versions ))
334334
335335 @staticmethod
336336 def getErrorParsedDBMSes ():
@@ -350,7 +350,7 @@ def getErrorParsedDBMSes():
350350 elif len (kb .htmlFp ) == 1 :
351351 htmlParsed = kb .htmlFp [0 ]
352352 elif len (kb .htmlFp ) > 1 :
353- htmlParsed = " or " .join ([ htmlFp for htmlFp in kb .htmlFp ] )
353+ htmlParsed = " or " .join (htmlFp for htmlFp in kb .htmlFp )
354354
355355 return htmlParsed
356356
@@ -932,7 +932,7 @@ def readInput(message, default=None, checkBatch=True):
932932
933933 if checkBatch and conf .batch :
934934 if isinstance (default , (list , tuple , set )):
935- options = "," .join ([ getUnicode (opt , UNICODE_ENCODING ) for opt in default ] )
935+ options = "," .join (getUnicode (opt , UNICODE_ENCODING ) for opt in default )
936936 elif default :
937937 options = getUnicode (default , UNICODE_ENCODING )
938938 else :
@@ -980,7 +980,7 @@ def randomInt(length=4):
980980 @rtype: C{str}
981981 """
982982
983- return int ("" .join ([ random .choice (string .digits if i != 0 else string .digits .replace ('0' , '' )) for i in xrange (0 , length )] ))
983+ return int ("" .join (random .choice (string .digits if i != 0 else string .digits .replace ('0' , '' )) for i in xrange (0 , length )))
984984
985985def randomStr (length = 4 , lowercase = False , alphabet = None ):
986986 """
@@ -992,11 +992,11 @@ def randomStr(length=4, lowercase=False, alphabet=None):
992992 """
993993
994994 if alphabet :
995- rndStr = "" .join ([ random .choice (alphabet ) for _ in xrange (0 , length )] )
995+ rndStr = "" .join (random .choice (alphabet ) for _ in xrange (0 , length ))
996996 elif lowercase :
997- rndStr = "" .join ([ random .choice (string .lowercase ) for _ in xrange (0 , length )] )
997+ rndStr = "" .join (random .choice (string .lowercase ) for _ in xrange (0 , length ))
998998 else :
999- rndStr = "" .join ([ random .choice (string .letters ) for _ in xrange (0 , length )] )
999+ rndStr = "" .join (random .choice (string .letters ) for _ in xrange (0 , length ))
10001000
10011001 return rndStr
10021002
@@ -1307,7 +1307,7 @@ def expandAsteriskForColumns(expression):
13071307 if columnsDict and conf .db in columnsDict and conf .tbl in columnsDict [conf .db ]:
13081308 columns = columnsDict [conf .db ][conf .tbl ].keys ()
13091309 columns .sort ()
1310- columnsStr = ", " .join ([ column for column in columns ] )
1310+ columnsStr = ", " .join (column for column in columns )
13111311 expression = expression .replace ("*" , columnsStr , 1 )
13121312
13131313 infoMsg = "the query with column names is: "
@@ -1359,7 +1359,7 @@ def parseUnionPage(output, expression, partial=False, condition=None, sort=True)
13591359 )
13601360
13611361 if partial or not condition :
1362- logOutput = "" .join ([ "%s%s%s" % (DUMP_START_MARKER , replaceNewlineTabs (value ), DUMP_STOP_MARKER ) for value in output ] )
1362+ logOutput = "" .join ("%s%s%s" % (DUMP_START_MARKER , replaceNewlineTabs (value ), DUMP_STOP_MARKER ) for value in output )
13631363 dataToSessionFile ("[%s][%s][%s][%s][%s]\n " % (conf .url , kb .injection .place , conf .parameters [kb .injection .place ], expression , logOutput ))
13641364
13651365 if sort :
@@ -2774,7 +2774,7 @@ def removeReflectiveValues(content, payload, suppressWarning=False):
27742774 while 2 * REFLECTED_NON_ALPHA_NUM_REGEX in regex :
27752775 regex = regex .replace (2 * REFLECTED_NON_ALPHA_NUM_REGEX , REFLECTED_NON_ALPHA_NUM_REGEX )
27762776
2777- if all ([ part .lower () in content .lower () for part in regex .split (REFLECTED_NON_ALPHA_NUM_REGEX )] ): # fast optimization check
2777+ if all (part .lower () in content .lower () for part in regex .split (REFLECTED_NON_ALPHA_NUM_REGEX )): # fast optimization check
27782778 parts = regex .split (REFLECTED_NON_ALPHA_NUM_REGEX )
27792779 if len (parts ) > REFLECTED_MAX_REGEX_PARTS : # preventing CPU hogs
27802780 regex = "%s.+?%s" % (REFLECTED_NON_ALPHA_NUM_REGEX .join (parts [:REFLECTED_MAX_REGEX_PARTS / 2 ]), REFLECTED_NON_ALPHA_NUM_REGEX .join (parts [- REFLECTED_MAX_REGEX_PARTS / 2 :]))
0 commit comments