Smbexec improvement "STATUS_OBJECT_NAME_NOT_FOUND" with server 2019

https://github.com/SecureAuthCorp/impacket/issues/777#issuecomment-1048253251
main
mpgn 2022-06-17 16:51:12 -04:00
parent 708e76d17a
commit f8bfe833d8
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ class SMBEXEC:
self.__batchFile = gen_random_string(6) + '.bat'
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:
command = self.__shell + data