File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 26
26
27
27
from lib .core .common import dataToSessionFile
28
28
from lib .core .common import safeStringFormat
29
+ from lib .core .common import randomStr
29
30
from lib .core .data import conf
30
31
from lib .core .data import kb
31
32
from lib .core .data import logger
@@ -62,7 +63,9 @@ def queryOutputLength(expression, payload):
62
63
if ( select and re .search ("\A(COUNT|LTRIM)\(" , regExpr , re .I ) ) or len (regExpr ) <= 1 :
63
64
return None , None , None
64
65
65
- if select :
66
+ if selectDistinctExpr :
67
+ lengthExpr = "SELECT %s FROM (%s) AS T%s" % (lengthQuery % regExpr , expression , randomStr (4 ))
68
+ elif select :
66
69
lengthExpr = expression .replace (regExpr , lengthQuery % regExpr , 1 )
67
70
else :
68
71
lengthExpr = lengthQuery % expression
@@ -82,7 +85,7 @@ def queryOutputLength(expression, payload):
82
85
83
86
if length == " " :
84
87
length = 0
85
-
88
+
86
89
return count , length , regExpr
87
90
88
91
def resume (expression , payload ):
You can’t perform that action at this time.
0 commit comments