(self, value, payload)
return re.sub("(?s)(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), value) if value else value
Replaces payload inside the input string with a given payload
Replaces payload inside the input string with a given payload
Replaces payload inside the input string with a given payload
def replacePayload(self, value, payload):
        """
        Replaces payload inside the input string with a given payload
        """

        _ = re.escape(PAYLOAD_DELIMITER)
        return re.sub("(?s)(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), value) if value else value
def replacePayload ( self , value , payload ) : _ = re . escape ( PAYLOAD_DELIMITER ) return re . sub ( "(?s)(%s.*?%s)" % ( _ , _ ) , ( "%s%s%s" % ( PAYLOAD_DELIMITER , payload , PAYLOAD_DELIMITER ) ) . replace ( "\\" , r"\\" ) , value ) if value else value