Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e024ac

Browse files
committed
Minor update (consistency patch)
1 parent 76b9fad commit 3e024ac

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

lib/core/agent.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -953,35 +953,35 @@ def forgeCaseStatement(self, expression):
953953

954954
return caseExpression
955955

956-
def addPayloadDelimiters(self, inpStr):
956+
def addPayloadDelimiters(self, value):
957957
"""
958958
Adds payload delimiters around the input string
959959
"""
960960

961-
return "%s%s%s" % (PAYLOAD_DELIMITER, inpStr, PAYLOAD_DELIMITER) if inpStr else inpStr
961+
return "%s%s%s" % (PAYLOAD_DELIMITER, value, PAYLOAD_DELIMITER) if value else value
962962

963-
def removePayloadDelimiters(self, inpStr):
963+
def removePayloadDelimiters(self, value):
964964
"""
965965
Removes payload delimiters from inside the input string
966966
"""
967967

968-
return inpStr.replace(PAYLOAD_DELIMITER, '') if inpStr else inpStr
968+
return value.replace(PAYLOAD_DELIMITER, '') if value else value
969969

970-
def extractPayload(self, inpStr):
970+
def extractPayload(self, value):
971971
"""
972972
Extracts payload from inside of the input string
973973
"""
974974

975975
_ = re.escape(PAYLOAD_DELIMITER)
976-
return extractRegexResult("(?s)%s(?P<result>.*?)%s" % (_, _), inpStr)
976+
return extractRegexResult("(?s)%s(?P<result>.*?)%s" % (_, _), value)
977977

978-
def replacePayload(self, inpStr, payload):
978+
def replacePayload(self, value, payload):
979979
"""
980980
Replaces payload inside the input string with a given payload
981981
"""
982982

983983
_ = re.escape(PAYLOAD_DELIMITER)
984-
return re.sub("(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), inpStr) if inpStr else inpStr
984+
return re.sub("(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), value) if value else value
985985

986986
def runAsDBMSUser(self, query):
987987
if conf.dbmsCred and "Ad Hoc Distributed Queries" not in query:

0 commit comments

Comments
 (0)