n0la / rcon

Source RCON client for command line
BSD 2-Clause "Simplified" License
140 stars 18 forks source link

Invalid auth reply, valid password? (valve css) #17

Closed butaford closed 4 years ago

butaford commented 4 years ago

Sorry, maybe I need to create a separate ticket. When connecting to CSS: ./rcon -1 -H 172.17.1.66 -p 27015 -P RCONPASS status an error occurs: Invalid auth reply, valid password? When using the configuration file:

[csspub]
hostname = 192.168.0.2
port = 27015
password = RCONPASS
#single_packet = true

./rcon -c /path/to/config/example/rconrc -s csspub status server answers correctly, no errors

sorry bad eng

Originally posted by @butaford in https://github.com/n0la/rcon/issues/16#issuecomment-599530287

butaford commented 4 years ago

password contains only: A-Z,a-z,0-9 I changed the password to 1234567890. The result is the same

UPD. New Commit 92a468e doesn't work at all UPD2. Fully functional commit: a94dd5f

martin8883 commented 4 years ago

Hi, same here for Avorion server, even worse. It does not work any longer, even with use of config file. Latest working commit is https://github.com/n0la/rcon/commit/a94dd5f9fcff7ac9a3312c279f91d0df20050883 All newer commits result in "Invalid auth reply, valid password?". Regards Martin

n0la commented 4 years ago

I fixed an issue in the authentication, and tested it against the Insurgency stand alone server (source based FPS). Could you verify it against Counter Strike?

martin8883 commented 4 years ago

No change for avorion after switching back to master and pulling: 2020-03-24 17_08_58-Window

With debug: 2020-03-24 17_13_01-

n0la commented 4 years ago

Are you a 100% sure the password is correct? And that your shell didn't escape/replace some characters in that password?

Your Avorion server does not send a AUTH_RESPONSE, which means that the password is not correct. If the password were correct, there would be two lines starting with >>.

martin8883 commented 4 years ago

Thank you very much for your fast responses! Yes, I am sure. No need to hide the password as there is no rcon access possible from outside: 2020-03-24 17_36_36-Window

butaford commented 4 years ago

screenshot 2020-03-24 001 I also made a short password. Without changes.

n0la commented 4 years ago

I found the bug. Please try again. And sorry for the inconvenience.

martin8883 commented 4 years ago

Well, Login does work now. But .... :-) No response for the command :-) Just stays at this state. 2020-03-24 18_55_06-Window 2020-03-24 18_57_10-Window

butaford commented 4 years ago

And sorry for the inconvenience.

All is well. For this, we are all here. :) screenshot 2020-03-24 001 Unfortunately, the answer never comes... Hanged

n0la commented 4 years ago

Yes, some servers simply don't reply to commands, and instead print the output of the commands to their own console and leave it at that. This is of course kinda weird, since you actually would want to grep through the output of some commands. I think this is some sort of server var that needs changing for that to work.

But I also made an -n (or --nowait) flag now, which makes RCON simply ignore any answers to commands it sent to the server. Please note, that this way you will never know whether the server actually executed the command or not.

martin8883 commented 4 years ago

No, this assumption is wrong. At least for Avorion. See this screenshot showing that there is a return value for the status command (with old version before refactoring): https://user-images.githubusercontent.com/4319959/77452305-1894aa80-6df6-11ea-9540-83fc5fbf3c55.png

n0la commented 4 years ago

Indeed it did. It seems the refactoring broke way too much. Anyhow, it now seems to work fine with my insurgency server, although I have no Avorion game server to test it against.

martin8883 commented 4 years ago

So should we stick with the old version or are you willing to put more debugging into it? If so, I could clone my avorion server and give you rcon access to the test installation.

butaford commented 4 years ago

Commit 3718e63 is working CS:S. Thanks

n0la commented 4 years ago

@martin8883 Could you test the latest commit with Avorion?

martin8883 commented 4 years ago

It´s working now with current version. Thank you very much!!! So I will delete my Avorion clone I created yesterday :D

Did not realise you already did one mor commit yesterday.