Smbexec improvement "STATUS_OBJECT_NAME_NOT_FOUND" with server 2019
https://github.com/SecureAuthCorp/impacket/issues/777#issuecomment-1048253251main
parent
708e76d17a
commit
f8bfe833d8
|
@ -87,7 +87,7 @@ class SMBEXEC:
|
||||||
self.__batchFile = gen_random_string(6) + '.bat'
|
self.__batchFile = gen_random_string(6) + '.bat'
|
||||||
|
|
||||||
if self.__retOutput:
|
if self.__retOutput:
|
||||||
command = self.__shell + 'echo '+ data + ' ^> \\\\127.0.0.1\\{}\\{} 2^>^&1 > %TEMP%\{} & %COMSPEC% /Q /c %TEMP%\{} & del %TEMP%\{}'.format(self.__share_name, self.__output, self.__batchFile, self.__batchFile, self.__batchFile)
|
command = self.__shell + 'echo '+ data + ' ^> \\\\127.0.0.1\\{}\\{} 2^>^&1 > %TEMP%\{} & %COMSPEC% /Q /c %TEMP%\{} & %COMSPEC% /Q /c del %TEMP%\{}'.format(self.__share_name, self.__output, self.__batchFile, self.__batchFile, self.__batchFile)
|
||||||
else:
|
else:
|
||||||
command = self.__shell + data
|
command = self.__shell + data
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue