mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
Fix for an Issue #318
This commit is contained in:
parent
35728fa443
commit
6c1ec9b54f
|
@ -30,7 +30,7 @@ class ICMPsh:
|
|||
self.rhostStr = None
|
||||
self.localIP = getLocalIP()
|
||||
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):
|
||||
message = "what is the back-end DBMS address? [%s] " % self.remoteIP
|
||||
|
@ -63,7 +63,7 @@ class ICMPsh:
|
|||
self.execCmd(cmd, silent=True)
|
||||
|
||||
def uploadIcmpshSlave(self, web=False):
|
||||
self._initVars()
|
||||
ICMPsh._initVars(self)
|
||||
self._randStr = randomStr(lowercase=True)
|
||||
self._icmpslaveRemoteBase = "tmpi%s.exe" % self._randStr
|
||||
|
||||
|
@ -77,9 +77,9 @@ class ICMPsh:
|
|||
logger.info("uploading icmpsh slave to '%s'" % self._icmpslaveRemote)
|
||||
|
||||
if web:
|
||||
self.webUpload(self._icmpslaveRemote, self.webDirectory, filepath=self.__icmpslave)
|
||||
self.webUpload(self._icmpslaveRemote, self.webDirectory, filepath=self._icmpslave)
|
||||
else:
|
||||
self.writeFile(self.__icmpslave, self._icmpslaveRemote, "binary")
|
||||
self.writeFile(self._icmpslave, self._icmpslaveRemote, "binary")
|
||||
|
||||
def icmpPwn(self):
|
||||
self._prepareIngredients()
|
||||
|
|
|
@ -503,7 +503,7 @@ class Metasploit:
|
|||
self._randStr = randomStr(lowercase=True)
|
||||
self._shellcodeFilePath = os.path.join(conf.outputPath, "tmpm%s" % self._randStr)
|
||||
|
||||
self._initVars()
|
||||
Metasploit._initVars(self)
|
||||
self._prepareIngredients(encode=encode)
|
||||
self._forgeMsfPayloadCmd(exitfunc, format, self._shellcodeFilePath, extra)
|
||||
|
||||
|
@ -583,7 +583,7 @@ class Metasploit:
|
|||
self.delRemoteFile(self.shellcodeexecRemote)
|
||||
|
||||
def smb(self):
|
||||
self._initVars()
|
||||
Metasploit._initVars(self)
|
||||
self._randFile = "tmpu%s.txt" % randomStr(lowercase=True)
|
||||
|
||||
self._runMsfCliSmbrelay()
|
||||
|
|
|
@ -49,11 +49,11 @@ class Registry:
|
|||
def _createLocalBatchFile(self):
|
||||
self._batPathFp = open(self._batPathLocal, "w")
|
||||
|
||||
if self.__operation == "read":
|
||||
if self._operation == "read":
|
||||
lines = self._batRead
|
||||
elif self.__operation == "add":
|
||||
elif self._operation == "add":
|
||||
lines = self._batAdd
|
||||
elif self.__operation == "delete":
|
||||
elif self._operation == "delete":
|
||||
lines = self._batDel
|
||||
|
||||
for line in lines:
|
||||
|
@ -70,9 +70,9 @@ class Registry:
|
|||
os.unlink(self._batPathLocal)
|
||||
|
||||
def readRegKey(self, regKey, regValue, parse=False):
|
||||
self.__operation = "read"
|
||||
self._operation = "read"
|
||||
|
||||
self._initVars(regKey, regValue, parse=parse)
|
||||
Registry._initVars(self, regKey, regValue, parse=parse)
|
||||
self._createRemoteBatchFile()
|
||||
|
||||
logger.debug("reading registry key '%s' value '%s'" % (regKey, regValue))
|
||||
|
@ -90,9 +90,9 @@ class Registry:
|
|||
return data
|
||||
|
||||
def addRegKey(self, regKey, regValue, regType, regData):
|
||||
self.__operation = "add"
|
||||
self._operation = "add"
|
||||
|
||||
self._initVars(regKey, regValue, regType, regData)
|
||||
Registry._initVars(self, regKey, regValue, regType, regData)
|
||||
self._createRemoteBatchFile()
|
||||
|
||||
debugMsg = "adding registry key value '%s' " % self._regValue
|
||||
|
@ -103,9 +103,9 @@ class Registry:
|
|||
self.delRemoteFile(self._batPathRemote)
|
||||
|
||||
def delRegKey(self, regKey, regValue):
|
||||
self.__operation = "delete"
|
||||
self._operation = "delete"
|
||||
|
||||
self._initVars(regKey, regValue)
|
||||
Registry._initVars(self, regKey, regValue)
|
||||
self._createRemoteBatchFile()
|
||||
|
||||
debugMsg = "deleting registry key value '%s' " % self._regValue
|
||||
|
|
Loading…
Reference in New Issue
Block a user