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

Skip to content

Commit 4e0e64d

Browse files
committed
Bug fix for DNS Exfiltration in PgSQL case ('invalid URI')
1 parent 49d3860 commit 4e0e64d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@ def replacePayload(self, value, payload):
993993
"""
994994

995995
_ = re.escape(PAYLOAD_DELIMITER)
996-
return re.sub("(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), value) if value else value
996+
return re.sub("(?s)(%s.*?%s)" % (_, _), ("%s%s%s" % (PAYLOAD_DELIMITER, payload, PAYLOAD_DELIMITER)).replace("\\", r"\\"), value) if value else value
997997

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

0 commit comments

Comments
 (0)