poweradminllc / PAExec

Remote execution, like PsExec
523 stars 177 forks source link

PAExec can't handle quoted computer names #3

Open ghost opened 9 years ago

ghost commented 9 years ago

Quoting the computer argument...

paexec.exe "\\somecomputer" "someprogram.exe"

...results in paexec failing to recognise it, instead treating it as the cmd argument.

This is different from PsExec.exe, which handles quoted computer names correctly.

bluebaroncanada commented 8 years ago

I don't think that you need to quote computer names.

ghost commented 8 years ago

I don't think that changes the fact that it's a bug.

bluebaroncanada commented 8 years ago

Well I think this is mostly abandonware now. I also see that there's no support for wchart in MinGw. I am actually working on a new project for psexecing a local file and I'll probably write a psexec clone as an example. I've also written a library to use getopt* with wchars. I don't know if getopt normally supports quoted arguments but I will modify the library if it doesn't and make sure this issue is corrected. I may also make a pull request for this library but tbh, there's a lot of issues I've seen when perusing this code.

One thing you could do is use my library and just modify this library slightly to use my version of getopt_*. That would help us both out.

https://github.com/bluebaroncanada/getoptW

ghost commented 8 years ago

I wonder if the getopt behaviour comes from the fact that, on posix, it's the shell that handles special character quoting, unlike on Windows where it's left to each program.

Either way, we've since moved on to using SSH for the job. Best of luck on the new project.

bluebaroncanada commented 8 years ago

Yeah we can't rely on ssh because we serve different clients. I do think that unix shells mostly handle that, though.