Discussions of the easy to use open source game control panel.

You are not logged in.


Welcome on board ! We are very proud to present you our forums powered by FluxBB ! Please Register, do not forget to read carefully Forum Rules and feel free to Contact Us if you see any problems. Finally, take part in site life !

#1 2014-01-26 12:21:07

Registered: 2013-12-01
Posts: 6

Bug console slider and command in Ajax

Could we also do also run commands in Ajax? Because now when you type the commands, page refreshes. There is often also a bug with loading message, for example:
Last login: Sun Jan ****: **: ** 2014 from *** - ** - ** - *.
root @ **************: ~ #.
A and that could also add to slider to be able to see the previous messages?

I cordially greet


#2 2014-01-26 20:56:18

Registered: 2013-11-30
Posts: 56

Re: Bug console slider and command in Ajax

It's not a bug per say , sometimes user sessions are overlaying. So let's say you send a command from user root, that user stays connected for 2-3 seconds to the server, but you send a command after 1 second from your last so it overlays the last connection and it kicks you to root#: (The screen -r command is ignored) .

Here is a fix that I think I will implement, since it's very dangerous to give users SSH access, I will make it so the console script goes trough a buffer.
Something like this: You send a command > that commands gets read by the script (also we check if the command contains "ls","cd","chmod","passwd"... and so on) , it's put on hold while a check is made if the SSH is safe ( a test command will check if the user can execute system commands ) after that it sends it to the server > After the server replies with a rows of text , that text get's again filtered and all of the lines with let's say $user@#: that could have passed somehow are removed > the rows get logged into the database so you can check your server logs history > Then it displays you the text data that is taken from the DB logs in the web console.
*Also you will just get a message that you are trying to type too fast so the bug will not happen, and since the text data will be from the DB and not take directly you won't see an empty console.

It's not actually that much to be recoded and done this way, I will probably do it to my script and will share it if it works the way I want it to. wink

Last edited by ThunderGod (2014-01-26 20:58:36)



Board footer

Powered by FluxBB