fix escaping in smbexec

main
Marshall Hallenbeck 2023-09-21 23:44:05 -04:00 committed by Marshall Hallenbeck
parent 5ec969c733
commit 1b97cebac3
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class SMBEXEC:
self.__batchFile = gen_random_string(6) + ".bat"
if self.__retOutput:
command = self.__shell + "echo " + data + f" ^> \\\\127.0.0.1\\{self.__share_name}\\{self.__output} 2^>^&1 > %TEMP%\\{self.__batchFile} & %COMSPEC% /Q /c %TEMP%\{self.__batchFile} & %COMSPEC% /Q /c del %TEMP%\\{self.__batchFile}"
command = self.__shell + "echo " + data + f" ^> \\\\127.0.0.1\\{self.__share_name}\\{self.__output} 2^>^&1 > %TEMP%\\{self.__batchFile} & %COMSPEC% /Q /c %TEMP%\\{self.__batchFile} & %COMSPEC% /Q /c del %TEMP%\\{self.__batchFile}"
else:
command = self.__shell + data