Bukkit Web Admin?

Discussion in 'Bukkit Help' started by MonsieurApple, Jan 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    MonsieurApple

    Hi Everyone-

    I pretty much suck at Java, so I was trying to think of other ways to contribute to this awesome project. I started considering writing a server administration software in PHP + MySQL, however, I think it's a little to soon to start.

    Right now, writing it would be like trying to hit a moving target. So, I think right now would be a good planning stage.

    What are your ideas, suggestions, and/or needs that you want in a web interface? Think about others that you've used and what you've liked/disliked about them.

    When I see what everyone comes up with, I'll compile a list of what I'm going to include and start working!

    Thanks!

    -Apple

    P.S. Of course this will all be free and open source :)
     
  2. Offline

    Ant59

    Already on it. Started writing it a while back, but have been waiting for the official Bukkit release.

    However, nothing stopping us having more than one. Yay for choice :p

    Good luck!
     
  3. Offline

    MonsieurApple

    Awesome!

    Can't wait to see how yours turns out :)
     
  4. Offline

    MonsieurApple

    Update: I have started the project and it's open-source.

    If there is anyone else *maybe* interested in helping, join #bzextreme on irc.freenode.net. You could also /msg "mrapple" (thats me) on freenode or irc.esper.net.

    Thanks :)
     
  5. Offline

    nichiatu

    Can't wait to see how this turns out, good luck!
     
  6. Offline

    Obsidian

    From what I've seen, the author of the JSONApi plugin for hMod is going to be converting the plugin over for Bukkit; with it, it should be extremely easy to build a web administration interface for Bukkit.
     
  7. Offline

    Demonofbirth

    Does this mean you can put administrative tools for your server in a place on your own website?
     
  8. Offline

    MonsieurApple

    It means you can manage your server from a web interface.
     
  9. Offline

    DerpinLlama

    You might find this helpful, combined with PHP's socket functions.
     
  10. Offline

    MonsieurApple

    Thanks, but I'm doing it a different way.

    I'm using proc_open to read/write to the process. Interesting link though :)
     
  11. Offline

    ShivalWolf

    I have been trying to read/write to the process but i cant get it to work no matter what i try the server does not process the command. Ate you willing to share how you are interfacing via proc_open?
    All i want it for is so my init script can trigger a real save-all and stop
    --- merged: Jan 24, 2011 4:25 AM ---
    Just looked at your php source (cant find in there where you are opening the process to read/write).
    Watch out for the sql injection and XSS vulnerbilities in your code.
    Check out the commands htmlentities and mysql_real_escape_string
    --- merged: Jan 24, 2011 4:27 AM ---
    Oh just saw the santatize script but still XSS possibilities.
     
  12. Offline

    MonsieurApple

    Thanks for looking at it :) If you want to help, I'd definitely appreciate it. Right now I'm just laying the cornerstones so that maybe other developers can hop on as well.

    As for opening the process, it will be opened something like this shell_exec("php /location/to/mcserver.php &").

    Inside mcserver.php, the java process is then started and pipes are opened to it. Everything the java process returns will be logged to mysql and ever so often (1 second probably) it will check mysql to see if it needs to run any commands.

    Also, I don't know javascript. If there are javascript developers out there looking for a fun project (mostly involving ajax), please let me know!
     
  13. Offline

    DerpinLlama

    So it's like PHP is writing to it's command line?
     
  14. Offline

    MonsieurApple

    Basically yes. See my post above to get more information about it.
     
  15. Offline

    ShivalWolf

    Ahhh I see what you are doing, Rather messy as it means you are starting the MC server via the webserver.
    Taking IO pipes seems rather messy but could do the job I am not sure how capturing the IO will work. don't forget to grab stderr as well so you can catch java plugin failures or other glitches.
     
  16. Offline

    ChadTheDJ

    I use MCMyAdmin and it works great, but I am willing to explore other options out there. Love the remote reboot because I have an admin from the UK who manages it remotely via the web console and FTP.
     
  17. Offline

    MonsieurApple

    McMyAdmin said it would provide bukkit support when it comes out. Which is to long to wait if you ask me :D

    Also, McMyAdmin is nice, but I wanted something centralized around Bukkit. I also wanted something that's open source and willing to take in feedback from the community. (Also something that doesn't announce on the server that it's running every half-hour).

    I couldn't fine one, so I made my own.

    P.S. Extremely busy with school this week, but I have a long weekend with lots of code to be written :)
     
  18. Offline

    Demonofbirth

    I wish you luck with your project
     
  19. Offline

    DerpinLlama

    Wait a sec... Wont this essentially be a wrapper for the server? >_>
     
  20. Offline

    TnT

    If so, its a wrapper for a server mod, but I think we need to go deeper for that... lets get a mod for the wrapper for the server mod... Inception.
     
  21. Offline

    Demonofbirth

    Whoa my mind has been blown
     
  22. Offline

    pmx

    I can probably help out with the javascript on this. Can do the design for the ui too if you need someone to do that?
     
  23. Offline

    MonsieurApple

    You would be my new favorite person.
     
  24. Offline

    pmx

    I've sent you and email to the address listed on the google code page. Let me know if you got it :)
     
  25. Offline

    MonsieurApple

    Wait, you aren't KyleXY or are you? Im so confused...
     
  26. Offline

    Obsidian

    Seems a bit problematic tbh. Not sure I like the idea of the proc_ functions in use here, but whatever floats your boat...

    Personally, using a standardized API is your best bet for interacting with the server. No, I don't just mean controlling it, but actually interacting with it. Getting information from it, showing who's online, how many are online, the plugins installed...etc. It also means you've got some compartmentalization. PHP will end up running under a different user than your minecraft server, and ought to help isolate things in case of a breach.
    That and you're playing with fire by using the proc_ functions. Be very, very, very careful about what data you pass to it - you don't want to introduce an opening that exposes a large chunk of your system.
     
  27. Offline

    pmx

    lol no im not he - my google username is dean@ web set go dot net
     
  28. Offline

    MonsieurApple

    Well, either way, I need to eventually start the server. I'm looking at the TCP plugin and trying to way the benefits/issues.

    With the current way I have planned out, it's very easy to log everything to MySQL, run commands, and see their returned value.

    As for proc_* functions, I have had lengthy conversations with some people in ##php, and I'm doing things like they should be done.
     
  29. Offline

    Obsidian

    Perhaps, let the system handle running the minecraft server?
    Right now, I'm using a shell script to manage running the server, along with cronjobs.
    You could probably just use shell_exec() with something like that too with task-dedicated scripts, and locking yourself down to only what you program it to do, but in the end it's up to you on what to use.

    I do want to warn you (if you choose to use the tcp plugin), you need to remember to either firewall that tcp port though from external access (ufw for the win) or have some sort of strong authentication and encryption in place for transmissions. You don't want to expose your system to a man-in-the-middle attack (or even just some ass sending in a few commands randomly to screw with your server's operation).
     
  30. Offline

    DerpinLlama

    This project was intended to be run on localhost by the looks of it anyway, Obsidian. Think I'm going to add support for binding to a specific IP in the next version.
     
Thread Status:
Not open for further replies.

Share This Page