@@ -69,6 +69,7 @@ class WebSocketException(Exception):
6969from lib .core .enums import ADJUST_TIME_DELAY
7070from lib .core .enums import AUTH_TYPE
7171from lib .core .enums import CUSTOM_LOGGING
72+ from lib .core .enums import HINT
7273from lib .core .enums import HTTP_HEADER
7374from lib .core .enums import HTTPMETHOD
7475from lib .core .enums import NULLCONNECTION
@@ -816,10 +817,14 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
816817 conf .httpHeaders .append ((HTTP_HEADER .CONTENT_TYPE , contentType ))
817818
818819 if payload :
820+ delimiter = conf .paramDel or (DEFAULT_GET_POST_DELIMITER if place != PLACE .COOKIE else DEFAULT_COOKIE_DELIMITER )
821+
819822 if not disableTampering and kb .tamperFunctions :
820823 for function in kb .tamperFunctions :
824+ hints = {}
825+
821826 try :
822- payload = function (payload = payload , headers = auxHeaders )
827+ payload = function (payload = payload , headers = auxHeaders , delimiter = delimiter , hints = hints )
823828 except Exception , ex :
824829 errMsg = "error occurred while running tamper "
825830 errMsg += "function '%s' ('%s')" % (function .func_name , getSafeExString (ex ))
@@ -832,6 +837,13 @@ def queryPage(value=None, place=None, content=False, getRatioValue=False, silent
832837
833838 value = agent .replacePayload (value , payload )
834839
840+ if hints :
841+ if HINT .APPEND in hints :
842+ value = "%s%s%s" % (value , delimiter , hints [HINT .APPEND ])
843+
844+ if HINT .PREPEND in hints :
845+ value = "%s%s%s" % (hints [HINT .PREPEND ], delimiter , value )
846+
835847 logger .log (CUSTOM_LOGGING .PAYLOAD , safecharencode (payload .replace ('\\ ' , BOUNDARY_BACKSLASH_MARKER )).replace (BOUNDARY_BACKSLASH_MARKER , '\\ ' ))
836848
837849 if place == PLACE .CUSTOM_POST and kb .postHint :
0 commit comments