diff --git a/nxc/protocols/smb/smbexec.py b/nxc/protocols/smb/smbexec.py index 81a70f92..7e1dbfbc 100755 --- a/nxc/protocols/smb/smbexec.py +++ b/nxc/protocols/smb/smbexec.py @@ -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