mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-06 12:41:30 +00:00
Minor refactoring for an Issue #295
This commit is contained in:
@@ -8,10 +8,10 @@ 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
|
||||
from lib.core.common import decloakToTemp
|
||||
from lib.core.common import decodeHexValue
|
||||
from lib.core.common import isNumPosStrValue
|
||||
from lib.core.common import isListLike
|
||||
@@ -253,14 +253,8 @@ 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 localFile.endswith('_'):
|
||||
localFile = decloakToTemp(localFile)
|
||||
|
||||
if conf.direct or isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||
if isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||
|
||||
Reference in New Issue
Block a user