@@ -301,8 +301,7 @@ def cleanupPayload(self, payload, origValue=None):
301301 ("[SPACE_REPLACE]" , kb .chars .space ),
302302 ("[DOLLAR_REPLACE]" , kb .chars .dollar ),
303303 ("[HASH_REPLACE]" , kb .chars .hash_ ),
304- ("[GENERIC_SQL_COMMENT]" , GENERIC_SQL_COMMENT ),
305- ("[ORIGINAL]" , origValue or "" )
304+ ("[GENERIC_SQL_COMMENT]" , GENERIC_SQL_COMMENT )
306305 )
307306 payload = reduce (lambda x , y : x .replace (y [0 ], y [1 ]), replacements , payload )
308307
@@ -312,9 +311,12 @@ def cleanupPayload(self, payload, origValue=None):
312311 for _ in set (re .findall (r"(?i)\[RANDSTR(?:\d+)?\]" , payload )):
313312 payload = payload .replace (_ , randomStr ())
314313
315- if origValue is not None and "[ORIGVALUE]" in payload :
314+ if origValue is not None :
316315 origValue = getUnicode (origValue )
317- payload = getUnicode (payload ).replace ("[ORIGVALUE]" , origValue if origValue .isdigit () else unescaper .escape ("'%s'" % origValue ))
316+ if "[ORIGVALUE]" in payload :
317+ payload = getUnicode (payload ).replace ("[ORIGVALUE]" , origValue if origValue .isdigit () else unescaper .escape ("'%s'" % origValue ))
318+ if "[ORIGINAL]" in payload :
319+ payload = getUnicode (payload ).replace ("[ORIGINAL]" , origValue )
318320
319321 if INFERENCE_MARKER in payload :
320322 if Backend .getIdentifiedDbms () is not None :
0 commit comments