n0la / rcon

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

Developement #25

Open dad98253 opened 3 years ago

dad98253 commented 3 years ago

I have enhanced the basic rcon client to include a simple rcurses based management console (see new -j command line option). It loops on a 3 second interval displaying the server status. A bar at the top displays local time and a bar at the bottom displays active command keys. Pressing the F1 key at the main (status) page will display a list of current users. Selecting a user offers two options: kick or ban. Pressing the F2 key at the main page offers a list of your map. Select a map to change level to it. Pressing the q key at any page will jump back to the previous page without performing any changes.

I hope you find it useful.

dad98253 commented 3 years ago

rcon-select-map

butaford commented 3 years ago

Wow

lyn1337 commented 3 years ago

Thanks, dad!

n0la commented 3 years ago

This is awesome, and it looks great. Your version would be a great tool to run in a tmux session in a remote shell.

The issue is however that this goes a bit beyond the scope of rcon. This tool was meant as a small, light-weight tool for shell scripts. But I am more than glad to add your version to the README.

n0la commented 3 years ago

There is only one issue with the code. By moving from AF_UNSPEC to AF_INET, you are removing the ability to connect to IPv6 hosts. You can stringify the address using getnameinfo, which can handle both IPv4 and IPv6, if you pass the ai_addr and ai_addrlen members to it.

n0la commented 3 years ago

I have added a link to @dad98253 fork to the README.

dad98253 commented 3 years ago

Re AF_INET... Ooops... yes, I normally disable IPv6 on my computers/networks

I should probably make that a compile option... BTW, I added another feature yesterday: The interactive rcon (handle_stdin) now has a command history/edit function. (hit up-arrow to recall previous input). I was getting tired of re-typing each line when navigating through commands. Re "tool for shell scripts"...I agree, and it can still be used that way. But, I like the interactive capability because it only needs to authorize once. My typical use is often diagnostic in nature. BYW, I usually connect to my server via ssh and then run rcon from the server. (ie., via localhost) I wonder if it might be worth adding some words to the readme/man page about rcon security. What do you think? On Sunday, June 27, 2021, 10:34:59 PM PDT, Florian Stinglmayr @.***> wrote:

There is only one issue with the code. By moving from AF_UNSPEC to AF_INET, you are removing the ability to connect to IPv6 hosts. You can stringify the address using getnameinfo, which can handle both IPv4 and IPv6, if you pass the ai_addr and ai_addrlen members to it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

n0la commented 3 years ago

Re "tool for shell scripts"...I agree, and it can still be used that way. But, I like the interactive capability because it only needs to authorize once. My typical use is often diagnostic in nature. BYW, I usually connect to my server via ssh and then run rcon from the server. (ie., via localhost)

To be frank, I do not wish to add curses code to a purely CLI interface. But that doesn't mean your tool does not have a place. Different tools for different tasks. Mine is for simply shell scripting, and yours is for those that wish a more interactive tool on the console.

That is why I added your tool to the README. So people who look for a more interactive tool know where to find your fork.

Ooops... yes, I normally disable IPv6 on my computers/networks

localhost is easier to write in IPv6 (::1) ;-) (jk btw.)

I wonder if it might be worth adding some words to the readme/man page about rcon security. What do you think?

On how passwords are sent plain text? That is probably a good idea.

dad98253 commented 3 years ago

I normally ssh to my server and then rcon via localhost. Unfortunately, many Windows users don't understand how to do that.

On Tuesday, July 13, 2021, 1:29:18 AM PDT, Florian Stinglmayr ***@***.***> wrote:  

Re "tool for shell scripts"...I agree, and it can still be used that way. But, I like the interactive capability because it only needs to authorize once. My typical use is often diagnostic in nature. BYW, I usually connect to my server via ssh and then run rcon from the server. (ie., via localhost)

To be frank, I do not wish to add curses code to a purely CLI interface. But that doesn't mean your tool does not have a place. Different tools for different tasks. Mine is for simply shell scripting, and yours is for those that wish a more interactive tool on the console.

That is why I added your tool to the README. So people who look for a more interactive tool know where to find your fork.

Ooops... yes, I normally disable IPv6 on my computers/networks

localhost is easier to write in IPv6 (::1) ;-) (jk btw.)

I wonder if it might be worth adding some words to the readme/man page about rcon security. What do you think?

On how passwords are sent plain text? That is probably a good idea.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

dad98253 commented 3 years ago

P.S.,I added a note regarding security to the README on my fork. You're welcome to borrow from it as you see fit...

On Tuesday, July 13, 2021, 1:29:18 AM PDT, Florian Stinglmayr ***@***.***> wrote:  

Re "tool for shell scripts"...I agree, and it can still be used that way. But, I like the interactive capability because it only needs to authorize once. My typical use is often diagnostic in nature. BYW, I usually connect to my server via ssh and then run rcon from the server. (ie., via localhost)

To be frank, I do not wish to add curses code to a purely CLI interface. But that doesn't mean your tool does not have a place. Different tools for different tasks. Mine is for simply shell scripting, and yours is for those that wish a more interactive tool on the console.

That is why I added your tool to the README. So people who look for a more interactive tool know where to find your fork.

Ooops... yes, I normally disable IPv6 on my computers/networks

localhost is easier to write in IPv6 (::1) ;-) (jk btw.)

I wonder if it might be worth adding some words to the readme/man page about rcon security. What do you think?

On how passwords are sent plain text? That is probably a good idea.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

butaford commented 3 years ago

Is it possible to add Cyrillic support? image Classic queries: image

In -j (stdout) mode, control does not work. No response to keystrokes. The "q" key only works.

P.S. sorry for my bad english