GodPotato icon indicating copy to clipboard operation
GodPotato copied to clipboard

Cannot use double quotes inside command

Open Pri3st opened this issue 2 years ago • 1 comments

When I try to run more complex commands (e.g .\GodPotato.exe -cmd "cmd /c net localgroup "Remote Desktop Users"" the command fails.

Pri3st avatar Dec 03 '23 18:12 Pri3st

With your command, it assumes you are ending at the second double quote. So .\GodPotato.exe -cmd "cmd /c net localgroup "

Most programs you can use single quotes in addition to double quotes. In this case you will also have to escape the double quotes

.\GodPotato-NET4.exe -cmd 'cmd /c net localgroup \"Remote Desktop Users\"'

image

cmd /c didn't like using the single quotes around Remote Desktop Users

If you chose to use powershell -c instead of cmd /c this would also work: .\GodPotato-NET4.exe -cmd "powershell.exe -c net localgroup 'Remote Desktop Users'"

Also for future reference, I don't think you exactly need the cmd /c this command worked just fine for me: .\GodPotato-NET4.exe -cmd 'net localgroup \"Remote Desktop Users\"'

image

Hopefully that helps

beauknowstech avatar Nov 19 '24 07:11 beauknowstech