What this is:
A web based command console for the Minecraft server. Currently it only gives you the same functionality as the built in gui does. More features may come later.
Screenshot of initial development version.
(I've since semi-fixed the who listing panel and added login/logout functionality)
Requirements:
Flippeh's multiplexing python script that can be found HERE. That script basically lets you connect to a port instead of trying to scrape stdin and stdout making talking to the server much MUCH easier.
A webserver with PHP installed and the socket module enabled.
I have included the version of Jquery I'm currently using but if you want to use your own or one of the ones hosted in the cloud just edit the header.php file accordingly.
Just unzip that someplace your webserver can get to it and then edit the mcterm_cfg.php file.
You will also need to setup Flippeh's Multiplexing script. (or something else like it that redirects the stdout and stdin from the server to a port)
Usage:
When you first visit the page it will ask you for the Server Password. This is whatever you setup as the password in the mineremote.ini file. (Part of Flippeh's stuff) Once you log in, just type commands in the input field in the bottom as you would on the gui.
If you mis-type the password you will have to click the logout button to re-try.
The web page should work on all reasonably standards compliant browsers.
(As in if you use IE 6 and it breaks, you get to keep all the pieces.)
It will also require both javascript and cookies to be enabled.
Latest Update:
Fixed it to actually work with the current version of the multiplexer.
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
Well good luck with that since it requires a specific server wrapper script to be installed, and it doesn't store any passwords. Course it might be vulnerable to brute forcing depending on how secure the password is. :wink.gif:
Besides, it's not an applet, this is all dhtml stuff. No flash, no Java, just HTML, css, and javascript. :wink.gif:
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
No, I meant I could find the applet on a server's website and use that to hack their servers.
Knowing the amount of people that are asking for help changing their PATH variable and posting local IPs, it could be fairly easy. They probably don't know how to secure an HTML page with a password.
No, I meant I could find the applet on a server's website and use that to hack their servers.
Knowing the amount of people that are asking for help changing their PATH variable and posting local IPs, it could be fairly easy. They probably don't know how to secure an HTML page with a password.
/reconsiders downloading this o_0
I'm paranoid now D:
Someone rant some techno babble saying that this is secure!
Eh it's as secure as anything else you are gonna run (possibly more so). You wouldn't put your minecraft_server.jar where the webserver is. Heck it doesn't even need to be on the same computer. (I've got mine on another computer myself.) The script also doesn't store the password used to connect to the server anywhere other than in a temporary session variable that is cleared when you logout. (or when PHP times it out - default of 24 min but that's configurable.)
If you really want to be relatively paranoid. (Like me) You put an .htaccess file in the folder with the PHP to require a password, then you make sure you use a different password for the mineremote.py script, and you make sure that the port the mineremote script is using isn't accessible from the outside. (I can only access that port from my LAN)
If you want to be completely secure, install a SSL certificate and use https. Also, make sure you always logout when done, use 16character (or greater) passwords with a mix of uppercase,lowercase,numbers, and symbols, and don't let your browser remember your password.
They probably don't know how to secure an HTML page with a password.
That's just an extra layer, the script already requires a password to work. You don't really -need- to secure the page. If you are really worried about someone sniffing your packets, use SSL.
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
Ok, so I have this on my system. I can get the multiplexer working, but I don't know how to point the multiplexer to my webserver (Let's say it's www.minecraft.com which it isn't...but it works for an example).
It's asking for login info, but I don't see where to put that login info either in the multiplexer, the ini, or the php stuff.
I'm new to PHP (though I've been teaching myself lately), and I know pretty much nothing about python except reading through other minecraft scripts in the past.
This is my mineremote.ini now:
[java]
heap_max = 1024M
heap_min = 1024M
server = ./minecraft_server.jar
[remote]
socktype = tcp
password = [SuperSecretPassword]
port = 9002
listenaddr = http://www.minecraft.com (<-- that's a lie)
Rollback Post to RevisionRollBack
Monkey Mines is a small 18+ Whitelisted Realms server that also allows families. We're currently looking for new players if they're not jerks.
What exactly is asking for login info?
If you mean the login prompt you get when you go to the page the PHP script provides, that would be the password you setup for the multiplexer.
The multiplexer shouldn't need to know about your webserver (Unless it has been changed to only allow connections from a white list or something. I confess I haven't looked at the latest version yet.) It just needs to know what host it is running on and what port it should be listening to. The PHP script handles the job of initiating the connection with the multiplexer so it also needs the same information you gave the multiplexer. (What host it is running on and what port it is listening to)
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
Heh, I keep waiting for one of my MUD peeps to discover the multiplexer and hook his own IRC/MUD bot up to it.
( Fun fact: The console here is actually re-using some of the code from my web-based client for my MUD.)
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
I'm now getting an error message when I log into the web terminal that says:
Warning: socket_connect() [function.socket-connect]: unable to connect [110]: Connection timed out in [web address removed]/mc_interface.php on line 19
Then a few hundred:
Warning: socket_connect() [function.socket-connect]: unable to connect [111]: Connection refused in [web address removed]/mc_interface.php on line 77
I don't know anything about sockets, but does anyone know what might cause that? (Thanks for your help so far)
Rollback Post to RevisionRollBack
Monkey Mines is a small 18+ Whitelisted Realms server that also allows families. We're currently looking for new players if they're not jerks.
Means it was not able to connect to the port + server you gave it. Check to make sure that the multiplexer is up and runing and that you don't have that port blocked in your firewall. You might also need to forward the port the multiplexer is using depending on your setup.
Basically the multiplexer is the server and the PHP script is the client. So you can follow similar steps to setting up as you had to for the MC server itself.
(The few hundred lines after are because I didn't take the time to make the javascript pick up on an error from the PHP so it keeps trying to poll the server for new msgs even when the connection failed.)
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
But this time I thought I did. I might be missing a step. in the mineremote.ini I have it set to port A. Do I need to open a different port for this? I have the php config file also set to port A. Are they conflicting? And if I need to open another port, where do I tell the multiplexer I did that?
Do I need to tell the multiplexer that I'm using this client?
Rollback Post to RevisionRollBack
Monkey Mines is a small 18+ Whitelisted Realms server that also allows families. We're currently looking for new players if they're not jerks.
Here, why don't I just show you what I have set up and working in my configs:
mineremote.ini
[remote]
port = 9002
password = notmyrealpassword
listenaddr = 192.168.1.102
[java]
server = ./minecraft_server.jar
heap_max = 1024M
heap_min = 1024M
mcterm_cfg.php
<?php
/***** CONFIG OPTIONS *****/
//number of seconds to allow for a command to respond
$response_delay = 1;
//number of seconds to wait when polling for msgs
//(Has to be less than your PHP script timeout)
$poll_timer = 1;
//command port for mineremote
$port = 9002;
//server hosting mineremote
$server = "192.168.1.102";
/***** END CONFIG *****/
?>
server.properties
#Minecraft server properties
#Fri Aug 13 09:02:31 MDT 2010
online-mode=true
server-ip=192.168.1.102
server-port=25565
max-players=20
level-name=world
192.168.1.102 is the LAN IP of my MC server. If your webserver is not located on your LAN then you will need to set $server to be your external IP instead of the internal one. (The same IP people would use to connect to your MC server)
The port in the mineremote.ini and mcterm_cfg.php script should be the same number. (9002 in my case)
I will also add that the web server I have running is on 192.168.1.101 on my LAN.
(Note that this shows up nowhere in any of the configs.)
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
That's why! I didn't know the listenaddr was the internal ip! I knew I was missing a step somewhere! Except now my computer shut off and I can't get it back on from here... so I can't test it to see if I'm right. I'll find out when I get home.
Rollback Post to RevisionRollBack
Monkey Mines is a small 18+ Whitelisted Realms server that also allows families. We're currently looking for new players if they're not jerks.
[REMOTE] Caught exception!
[REMOTE] Function: mainloop() > clientdata
[REMOTE] Exception: (107, 'Transport endpoint is not connected')
in the server console. And a bunch of
Warning: socket_connect() [function.socket-connect]: unable to connect [111]: Connection refused in /var/www/admin/mcterm/mc_interface.php on line 19
Connection refusedACCESS DENIED!
ACCESS DENIED!
ACCESS DENIED!
ACCESS DENIED!
in the web terminal. Password is correct, configured to connect via TCP on 127.0.0.1. The multiplex_client works fine when set to INET, so multiplexer is working as far as I know.
Stupid question, is your web server on the same machine as the multiplexer? If the answer is no, then you are using the wrong IP. (That IP means "Myself" so the webserver would be trying to connect to itself.)
If everything is on the same machine, I'm not sure what to tell you other than to double check the firewall.
Rollback Post to RevisionRollBack
Tis far better to be a witty fool than a foolish wit.
Yay, now all I have to do is find out where this applet is and I can hack anyone's server :biggrin.gif:
Nah jk, good work.
Even if you could find out where this 'applet' is nine times out of 10 it has a prompt. Even assuming it's on a web server too is misleading because you could easily run this locally.
<?php
/***** CONFIG OPTIONS *****/
//number of seconds to allow for a command to respond
$response_delay = 1;
//number of seconds to wait when polling for msgs
//(Has to be less than your PHP script timeout)
$poll_timer = 1;
//command port for mineremote
$port = 9001;
//server hosting mineremote
$server = "127.0.0.1";
/***** END CONFIG *****/
?>
A web based command console for the Minecraft server. Currently it only gives you the same functionality as the built in gui does. More features may come later.
Screenshot of initial development version.
(I've since semi-fixed the who listing panel and added login/logout functionality)
Requirements:
Flippeh's multiplexing python script that can be found HERE. That script basically lets you connect to a port instead of trying to scrape stdin and stdout making talking to the server much MUCH easier.
A webserver with PHP installed and the socket module enabled.
I have included the version of Jquery I'm currently using but if you want to use your own or one of the ones hosted in the cloud just edit the header.php file accordingly.
Installation:
The zip file with everything you need:
http://thefool76.com/minecraft/mods/mcterm.zip
Just unzip that someplace your webserver can get to it and then edit the mcterm_cfg.php file.
You will also need to setup Flippeh's Multiplexing script. (or something else like it that redirects the stdout and stdin from the server to a port)
Usage:
When you first visit the page it will ask you for the Server Password. This is whatever you setup as the password in the mineremote.ini file. (Part of Flippeh's stuff) Once you log in, just type commands in the input field in the bottom as you would on the gui.
If you mis-type the password you will have to click the logout button to re-try.
The web page should work on all reasonably standards compliant browsers.
(As in if you use IE 6 and it breaks, you get to keep all the pieces.)
It will also require both javascript and cookies to be enabled.
Latest Update:
Fixed it to actually work with the current version of the multiplexer.
Nah jk, good work.
Besides, it's not an applet, this is all dhtml stuff. No flash, no Java, just HTML, css, and javascript. :wink.gif:
Knowing the amount of people that are asking for help changing their PATH variable and posting local IPs, it could be fairly easy. They probably don't know how to secure an HTML page with a password.
/reconsiders downloading this o_0
I'm paranoid now D:
Someone rant some techno babble saying that this is secure!
If you really want to be relatively paranoid. (Like me) You put an .htaccess file in the folder with the PHP to require a password, then you make sure you use a different password for the mineremote.py script, and you make sure that the port the mineremote script is using isn't accessible from the outside. (I can only access that port from my LAN)
If you want to be completely secure, install a SSL certificate and use https. Also, make sure you always logout when done, use 16character (or greater) passwords with a mix of uppercase,lowercase,numbers, and symbols, and don't let your browser remember your password.
That's just an extra layer, the script already requires a password to work. You don't really -need- to secure the page. If you are really worried about someone sniffing your packets, use SSL.
It's asking for login info, but I don't see where to put that login info either in the multiplexer, the ini, or the php stuff.
I'm new to PHP (though I've been teaching myself lately), and I know pretty much nothing about python except reading through other minecraft scripts in the past.
This is my mineremote.ini now:
[java]
heap_max = 1024M
heap_min = 1024M
server = ./minecraft_server.jar
[remote]
socktype = tcp
password = [SuperSecretPassword]
port = 9002
listenaddr = http://www.minecraft.com (<-- that's a lie)
If you mean the login prompt you get when you go to the page the PHP script provides, that would be the password you setup for the multiplexer.
The multiplexer shouldn't need to know about your webserver (Unless it has been changed to only allow connections from a white list or something. I confess I haven't looked at the latest version yet.) It just needs to know what host it is running on and what port it should be listening to. The PHP script handles the job of initiating the connection with the multiplexer so it also needs the same information you gave the multiplexer. (What host it is running on and what port it is listening to)
( Fun fact: The console here is actually re-using some of the code from my web-based client for my MUD.)
Warning: socket_connect() [function.socket-connect]: unable to connect [110]: Connection timed out in [web address removed]/mc_interface.php on line 19
Then a few hundred:
Warning: socket_connect() [function.socket-connect]: unable to connect [111]: Connection refused in [web address removed]/mc_interface.php on line 77
I don't know anything about sockets, but does anyone know what might cause that? (Thanks for your help so far)
Basically the multiplexer is the server and the PHP script is the client. So you can follow similar steps to setting up as you had to for the MC server itself.
(The few hundred lines after are because I didn't take the time to make the javascript pick up on an error from the PHP so it keeps trying to poll the server for new msgs even when the connection failed.)
But this time I thought I did. I might be missing a step. in the mineremote.ini I have it set to port A. Do I need to open a different port for this? I have the php config file also set to port A. Are they conflicting? And if I need to open another port, where do I tell the multiplexer I did that?
Do I need to tell the multiplexer that I'm using this client?
mineremote.ini
mcterm_cfg.php
server.properties
192.168.1.102 is the LAN IP of my MC server. If your webserver is not located on your LAN then you will need to set $server to be your external IP instead of the internal one. (The same IP people would use to connect to your MC server)
The port in the mineremote.ini and mcterm_cfg.php script should be the same number. (9002 in my case)
I will also add that the web server I have running is on 192.168.1.101 on my LAN.
(Note that this shows up nowhere in any of the configs.)
in the server console. And a bunch of
in the web terminal. Password is correct, configured to connect via TCP on 127.0.0.1. The multiplex_client works fine when set to INET, so multiplexer is working as far as I know.
If everything is on the same machine, I'm not sure what to tell you other than to double check the firewall.
Even if you could find out where this 'applet' is nine times out of 10 it has a prompt. Even assuming it's on a web server too is misleading because you could easily run this locally.
multiplexer settings:
mcterm settings: