mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
fix escaping in smbexec
This commit is contained in:
committed by
Marshall Hallenbeck
parent
5ec969c733
commit
1b97cebac3
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user