@@ -215,7 +215,7 @@ def setTimeBased(place, parameter, payload):
215215 if condition :
216216 dataToSessionFile ("[%s][%s][%s][Time-based blind injection][%s]\n " % (conf .url , place , safeFormatString (conf .parameters [place ]), payload ))
217217
218- def setUnion (comment = None , count = None , position = None , negative = False , falseCond = False , payload = None ):
218+ def setUnion (comment = None , count = None , position = None , negative = False , falseCond = False , char = None , payload = None ):
219219 """
220220 @param comment: union comment to save in session file
221221 @type comment: C{str}
@@ -284,6 +284,16 @@ def setUnion(comment=None, count=None, position=None, negative=False, falseCond=
284284
285285 kb .unionFalseCond = True
286286
287+ if char :
288+ condition = (
289+ not kb .resumedQueries or ( kb .resumedQueries .has_key (conf .url ) and
290+ ( not kb .resumedQueries [conf .url ].has_key ("Union char" )
291+ ) )
292+ )
293+
294+ if condition :
295+ dataToSessionFile ("[%s][%s][%s][Union char][%s]\n " % (conf .url , kb .injection .place , safeFormatString (conf .parameters [kb .injection .place ]), char ))
296+
287297 if payload :
288298 condition = (
289299 not kb .resumedQueries or ( kb .resumedQueries .has_key (conf .url ) and
@@ -568,6 +578,12 @@ def resumeConfKb(expression, url, value):
568578 logMsg = "resuming union false condition from session file"
569579 logger .info (logMsg )
570580
581+ elif expression == "Union char" and url == conf .url :
582+ conf .uChar = value [:- 1 ]
583+
584+ logMsg = "resuming union char %s from session file" % conf .uChar
585+ logger .info (logMsg )
586+
571587 elif expression == "Union payload" and url == conf .url :
572588 kb .unionTest = value [:- 1 ]
573589
0 commit comments