mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Implementation for an Issue #295
This commit is contained in:
@@ -6,7 +6,9 @@ See the file 'doc/COPYING' for copying permission
|
||||
"""
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
from extra.cloak.cloak import decloak
|
||||
from lib.core.agent import agent
|
||||
from lib.core.common import dataToOutFile
|
||||
from lib.core.common import Backend
|
||||
@@ -253,6 +255,15 @@ class Filesystem:
|
||||
def writeFile(self, localFile, remoteFile, fileType=None):
|
||||
self.checkDbmsOs()
|
||||
|
||||
if localFile.endswith("_"):
|
||||
content = decloak(localFile)
|
||||
_ = os.path.split(localFile[:-1])[-1]
|
||||
prefix, suffix = os.path.splitext(_)
|
||||
handle, localFile = tempfile.mkstemp(prefix=prefix, suffix=suffix)
|
||||
os.close(handle)
|
||||
with open(localFile, "w+b") as f:
|
||||
f.write(content)
|
||||
|
||||
if conf.direct or isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||
if isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||
debugMsg = "going to upload the %s file with " % fileType
|
||||
|
||||
Reference in New Issue
Block a user