File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ def _initVars(self):
3030 self .rhostStr = None
3131 self .localIP = getLocalIP ()
3232 self .remoteIP = getRemoteIP ()
33- self ._icmpslave = normalizePath (os .path .join (paths .SQLMAP_EXTRAS_PATH , "icmpsh" , "icmpsh.exe " ))
33+ self ._icmpslave = normalizePath (os .path .join (paths .SQLMAP_EXTRAS_PATH , "icmpsh" , "icmpsh.exe_ " ))
3434
3535 def _selectRhost (self ):
3636 message = "what is the back-end DBMS address? [%s] " % self .remoteIP
Original file line number Diff line number Diff line change 66"""
77
88import os
9+ import tempfile
910
11+ from extra .cloak .cloak import decloak
1012from lib .core .agent import agent
1113from lib .core .common import dataToOutFile
1214from lib .core .common import Backend
@@ -253,6 +255,15 @@ def readFile(self, remoteFiles):
253255 def writeFile (self , localFile , remoteFile , fileType = None ):
254256 self .checkDbmsOs ()
255257
258+ if localFile .endswith ("_" ):
259+ content = decloak (localFile )
260+ _ = os .path .split (localFile [:- 1 ])[- 1 ]
261+ prefix , suffix = os .path .splitext (_ )
262+ handle , localFile = tempfile .mkstemp (prefix = prefix , suffix = suffix )
263+ os .close (handle )
264+ with open (localFile , "w+b" ) as f :
265+ f .write (content )
266+
256267 if conf .direct or isTechniqueAvailable (PAYLOAD .TECHNIQUE .STACKED ):
257268 if isTechniqueAvailable (PAYLOAD .TECHNIQUE .STACKED ):
258269 debugMsg = "going to upload the %s file with " % fileType
You can’t perform that action at this time.
0 commit comments