mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
Implementation for an Issue #295
This commit is contained in:
parent
6270e9337b
commit
ac407ae4a1
Binary file not shown.
BIN
extra/icmpsh/icmpsh.exe_
Normal file
BIN
extra/icmpsh/icmpsh.exe_
Normal file
Binary file not shown.
|
@ -30,7 +30,7 @@ class ICMPsh:
|
||||||
self.rhostStr = None
|
self.rhostStr = None
|
||||||
self.localIP = getLocalIP()
|
self.localIP = getLocalIP()
|
||||||
self.remoteIP = getRemoteIP()
|
self.remoteIP = getRemoteIP()
|
||||||
self._icmpslave = normalizePath(os.path.join(paths.SQLMAP_EXTRAS_PATH, "icmpsh", "icmpsh.exe"))
|
self._icmpslave = normalizePath(os.path.join(paths.SQLMAP_EXTRAS_PATH, "icmpsh", "icmpsh.exe_"))
|
||||||
|
|
||||||
def _selectRhost(self):
|
def _selectRhost(self):
|
||||||
message = "what is the back-end DBMS address? [%s] " % self.remoteIP
|
message = "what is the back-end DBMS address? [%s] " % self.remoteIP
|
||||||
|
|
|
@ -6,7 +6,9 @@ See the file 'doc/COPYING' for copying permission
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import tempfile
|
||||||
|
|
||||||
|
from extra.cloak.cloak import decloak
|
||||||
from lib.core.agent import agent
|
from lib.core.agent import agent
|
||||||
from lib.core.common import dataToOutFile
|
from lib.core.common import dataToOutFile
|
||||||
from lib.core.common import Backend
|
from lib.core.common import Backend
|
||||||
|
@ -253,6 +255,15 @@ class Filesystem:
|
||||||
def writeFile(self, localFile, remoteFile, fileType=None):
|
def writeFile(self, localFile, remoteFile, fileType=None):
|
||||||
self.checkDbmsOs()
|
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 conf.direct or isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||||
if isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
if isTechniqueAvailable(PAYLOAD.TECHNIQUE.STACKED):
|
||||||
debugMsg = "going to upload the %s file with " % fileType
|
debugMsg = "going to upload the %s file with " % fileType
|
||||||
|
|
Loading…
Reference in New Issue
Block a user