In case of no output no need to launch cmd.exe

This commit is contained in:
Oleksii Shevchuk 2017-07-06 10:53:22 +03:00
parent 5a9070dde2
commit 50f2fd4a8a
1 changed files with 4 additions and 1 deletions

View File

@ -409,9 +409,12 @@ class RemoteShellwmi():
self.__transferClient.deleteFile(self.__share, self.__output)
def execute_remote(self, data):
command = self.__shell + data
if self.__noOutput is False:
command = self.__shell + data
command += ' 1> ' + '\\\\127.0.0.1\\%s' % self.__share + self.__output + ' 2>&1'
else:
command = data
obj = self.__win32Process.Create(command, self.__pwd, None)
self.get_output()