mirror of https://github.com/n1nj4sec/pupy.git
In case of no output no need to launch cmd.exe
This commit is contained in:
parent
5a9070dde2
commit
50f2fd4a8a
|
@ -409,9 +409,12 @@ class RemoteShellwmi():
|
||||||
self.__transferClient.deleteFile(self.__share, self.__output)
|
self.__transferClient.deleteFile(self.__share, self.__output)
|
||||||
|
|
||||||
def execute_remote(self, data):
|
def execute_remote(self, data):
|
||||||
command = self.__shell + data
|
|
||||||
if self.__noOutput is False:
|
if self.__noOutput is False:
|
||||||
|
command = self.__shell + data
|
||||||
command += ' 1> ' + '\\\\127.0.0.1\\%s' % self.__share + self.__output + ' 2>&1'
|
command += ' 1> ' + '\\\\127.0.0.1\\%s' % self.__share + self.__output + ' 2>&1'
|
||||||
|
else:
|
||||||
|
command = data
|
||||||
|
|
||||||
obj = self.__win32Process.Create(command, self.__pwd, None)
|
obj = self.__win32Process.Create(command, self.__pwd, None)
|
||||||
self.get_output()
|
self.get_output()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue