amuck-landowner

Run Linux Commands from Web Browser

shovenose

New Member
Verified Provider
I am trying to make a little utility that I can log in to from my browser, and then can run the reboot command straight from the PHP.

Thanks!
 

MannDude

Just a dude
vpsBoard Founder
Moderator
There are browser based terminals, which would do what you want, as well as allow you to issue other commands as needed.
 

shovenose

New Member
Verified Provider
There are browser based terminals, which would do what you want, as well as allow you to issue other commands as needed.
Thanks, however I don't want a terminal. I just want to make the button in my PHP app click and then it runs reboot on the server.
 

Xenfinity

New Member
Verified Provider
shell_exec($_GET['q']);
**sighs** … another compromised website. Customer, why don't you update from WordPress 2.8 already?!

This happens more often than you'd think. -_-

I've even had some customers try to upgrade from Joomla! 1.0 to Joomla! 1.5… geez.

Nick
 

shovenose

New Member
Verified Provider
**sighs** … another compromised website. Customer, why don't you update from WordPress 2.8 already?!


This happens more often than you'd think. -_-


I've even had some customers try to upgrade from Joomla! 1.0 to Joomla! 1.5… geez.


Nick
If it's in a back end file that isn't accessible without logging in then it doesn't matter right?
 

vpsukraine

New Member
You can run command like shell_exec() or exec() only as web-server user running!

 

You need use ssh2 lib to auth as root and run some commands
 

kunnu

Active Member
Verified Provider
Try this code.

Code:
<?php
shell_exec($_GET['poweroff']);
echo "done.......";
?>
 
Top
amuck-landowner