(self, fileContent, tmpPath)
| 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: |
no test coverage detected