@@ -207,7 +207,7 @@ def setError():
207207 if condition :
208208 dataToSessionFile ("[%s][%s][%s][Error based injection][Yes]\n " % (conf .url , kb .injPlace , safeFormatString (conf .parameters [kb .injPlace ])))
209209
210- def setUnion (comment = None , count = None , position = None , negative = False , falseCond = False ):
210+ def setUnion (comment = None , count = None , position = None , negative = False , falseCond = False , payload = None ):
211211 """
212212 @param comment: union comment to save in session file
213213 @type comment: C{str}
@@ -270,6 +270,18 @@ def setUnion(comment=None, count=None, position=None, negative=False, falseCond=
270270
271271 kb .unionFalseCond = True
272272
273+ if payload :
274+ condition = (
275+ not kb .resumedQueries or ( kb .resumedQueries .has_key (conf .url ) and
276+ ( not kb .resumedQueries [conf .url ].has_key ("Union payload" )
277+ ) )
278+ )
279+
280+ if condition :
281+ dataToSessionFile ("[%s][%s][%s][Union payload][%s]\n " % (conf .url , kb .injPlace , safeFormatString (conf .parameters [kb .injPlace ]), payload ))
282+
283+ kb .unionTest = payload
284+
273285def setRemoteTempPath ():
274286 condition = (
275287 not kb .resumedQueries or ( kb .resumedQueries .has_key (conf .url ) and
@@ -483,6 +495,13 @@ def resumeConfKb(expression, url, value):
483495 logMsg += "%s from session file" % kb .unionPosition
484496 logger .info (logMsg )
485497
498+ elif expression == "Union payload" and url == conf .url :
499+ kb .unionTest = value [:- 1 ]
500+
501+ logMsg = "resuming union payload "
502+ logMsg += "%s from session file" % kb .unionTest
503+ logger .info (logMsg )
504+
486505 elif expression == "Remote temp path" and url == conf .url :
487506 conf .tmpPath = unSafeFormatString (value [:- 1 ])
488507
0 commit comments