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

Skip to content

Commit 9568ee3

Browse files
committed
Fixes #4548
1 parent f3e8039 commit 9568ee3

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

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

plugins/dbms/mssqlserver/filesystem.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import ntpath
99
import os
1010

11+
from lib.core.common import checkFile
1112
from lib.core.common import getLimitRange
1213
from lib.core.common import isNumPosStrValue
1314
from lib.core.common import isTechniqueAvailable
@@ -384,13 +385,13 @@ def stackedWriteFile(self, localFile, remoteFile, fileType, forceCheck=False):
384385
# procedure to write a file on the back-end Microsoft SQL Server
385386
# file system
386387
self.initEnv()
387-
388388
self.getRemoteTempPath()
389389

390390
tmpPath = posixToNtSlashes(conf.tmpPath)
391391
remoteFile = posixToNtSlashes(remoteFile)
392-
with open(localFile, "rb") as f:
393-
localFileContent = f.read()
392+
393+
checkFile(localFile)
394+
localFileContent = open(localFile, "rb").read()
394395

395396
self._stackedWriteFilePS(tmpPath, localFileContent, remoteFile, fileType)
396397
written = self.askCheckWrittenFile(localFile, remoteFile, forceCheck)

0 commit comments

Comments
 (0)