mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 20:51:31 +00:00
adding support for PgSQL DNS data exfiltration
This commit is contained in:
@@ -1609,11 +1609,17 @@ def getSPQLSnippet(dbms, name, **variables):
|
||||
retVal = readCachedFileContent(filename)
|
||||
|
||||
retVal = re.sub(r"#.+", "", retVal)
|
||||
retVal = re.sub(r"(?s);\W+", "; ", retVal).strip()
|
||||
retVal = re.sub(r"(?s);\s+", "; ", retVal).strip()
|
||||
|
||||
for _ in variables.keys():
|
||||
retVal = re.sub(r"%%%s%%" % _, variables[_], retVal)
|
||||
|
||||
for _ in re.findall(r"%RANDSTR\d+%", retVal, re.I):
|
||||
retVal = retVal.replace(_, randomStr())
|
||||
|
||||
for _ in re.findall(r"%RANDINT\d+%", retVal, re.I):
|
||||
retVal = retVal.replace(_, randomInt())
|
||||
|
||||
_ = re.search(r"%(\w+)%", retVal, re.I)
|
||||
if _:
|
||||
errMsg = "unresolved variable '%s' in SPL snippet '%s'" % (_.group(1), name)
|
||||
|
||||
Reference in New Issue
Block a user