Skip to content

Commit bec4ded

Browse files
committed
Enabling PostgreSQL file write over a gadget when stacked queries are unavailable
1 parent 529fc7a commit bec4ded

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty import six
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.10.8.48"
23+
VERSION = "1.10.8.49"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/generic/filesystem.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,13 @@ def writeFile(self, localFile, remoteFile, fileType=None, forceCheck=False):
315315
debugMsg += "stacked query technique"
316316
logger.debug(debugMsg)
317317

318+
written = self.stackedWriteFile(localFile, remoteFile, fileType, forceCheck)
319+
self.cleanup(onlyFileTbl=True)
320+
elif Backend.isDbms(DBMS.PGSQL) and inject.getGadget():
321+
debugMsg = "going to upload the file '%s' with " % fileType
322+
debugMsg += "large object technique through a gadget"
323+
logger.debug(debugMsg)
324+
318325
written = self.stackedWriteFile(localFile, remoteFile, fileType, forceCheck)
319326
self.cleanup(onlyFileTbl=True)
320327
elif isTechniqueAvailable(PAYLOAD.TECHNIQUE.UNION) and Backend.isDbms(DBMS.MYSQL):

0 commit comments

Comments
 (0)