EXEC_SHELL_COMMAND_SYNC reporting "no command given"

You have a question or need an advice about how to do something? Ask it here!
Post Reply
Thijmen
Posts: 111
Joined: 16 Jul 2019 20:19
EXEC_SHELL_COMMAND_SYNC reporting "no command given"

Post by Thijmen »

Hi there,

So I'm trying to call a bat file via the TCP connection.
When I run

Code: Select all

 .\pfremcmd.exe -h="127.0.0.1" -p=8052 -a="my-password" -c="EXEC_SHELL_COMMAND_SYNC C:\Users\Administrator\Desktop\move.bat 'Y:\Automatisering\My Uploads\some mp3.mp3' 'Y:\Automatisering\some other.mp3'"
I receive

Code: Select all

EXEC_SHELL_COMMAND_SYNC Result:
ERROR: no command given
I must be doing something wrong, but what?
User avatar
radio42
Site Admin
Posts: 8951
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: EXEC_SHELL_COMMAND_SYNC reporting "no command given"

Post by radio42 »

EXEC_SHELL... commands can not be executed from "pfremcmd.exe".
This is because it doesn't make sense, as you are already executing a command from the shell, hence it doesn't make sense to remotely execute a shell command - this can be done also directly.
Thijmen
Posts: 111
Joined: 16 Jul 2019 20:19
Re: EXEC_SHELL_COMMAND_SYNC reporting "no command given"

Post by Thijmen »

I see. The reason I wanted to do something like this, is that I do a TCP remote connection (and not actually locally, I did the pfremcmd to validate it is not my socket implementation gone wrong here) is that I do not have FS access from this server. Just the TCP socket.

Are there any other solutions as to what I try to accomplish here?
User avatar
radio42
Site Admin
Posts: 8951
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: EXEC_SHELL_COMMAND_SYNC reporting "no command given"

Post by radio42 »

Yes, you run a classic windows remote shell (see WinRM).

And this is also the other main reason, why I don’t allow it, as this would be a severe security issue, if I would allow remote shell access via ProppFrexx.
Thijmen
Posts: 111
Joined: 16 Jul 2019 20:19
Re: EXEC_SHELL_COMMAND_SYNC reporting "no command given"

Post by Thijmen »

You're totally right (oops, no, I am not an LLM :D )
Makes sense now you explain this. I'll try to find something else :)

Post Reply