Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'execClientCommand' script command #173

Open
T-Maxxx opened this issue Jun 10, 2017 · 5 comments
Open

'execClientCommand' script command #173

T-Maxxx opened this issue Jun 10, 2017 · 5 comments

Comments

@T-Maxxx
Copy link
Contributor

T-Maxxx commented Jun 10, 2017

Known fact, you can send string from server to client to be executed as console command using setClientDvar, openMenuNoMouse (openMenu), dvar and custom menu. But you have to add this custom menu to mod before use. So I think it'll be good to have such functionality without involving menu stuff.

Pros:

  • Can be used on servers without mods;
  • No hud flickering when using (for example, LMB -> "+melee").

Cons:

  • Must hook message dispatcher on client to parse custom command (like it made with "disconnect", "statusResponse" etc.);
  • Input string must be parsed on client to remove any harmful commands.

I can handle server part but not client. So if anybody is interesed, I can make other branch in server for you to be able to test.

@AlexanderCurl
Copy link
Contributor

Up!

@T-Maxxx
Copy link
Contributor Author

T-Maxxx commented Jun 11, 2017

@callofduty4x/dev I have added branch "iss173". Any help with CL_ConnectionlessPacket on client appreciated.
About harmful commands, there are two ways: black/whitelist. I prefer blacklist because now modders can execute really anything.

@D4edalus
Copy link
Contributor

D4edalus commented Aug 4, 2017

as of now i can only think of "connect" and "bind" that needs to be blocked. what else could be harmful? i'm sure there is more .. opening it even through a blacklist seems dangerous to me currently.

@T-Maxxx
Copy link
Contributor Author

T-Maxxx commented Aug 5, 2017

vstr as it allows to execute any command as string:

self setClientDvar("execute", "connect my.shitty.server");
self execClientCommand("vstr execute");

@D4edalus
Copy link
Contributor

D4edalus commented Aug 5, 2017

yeah i'm aware that's possible. we certainly won't put that out in the wild.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants