PHP Web System Interface
Posted: Sun Apr 24, 2005 10:14 pm
Well there came a time in college last week when I realised I needed to be able to interact with my home pcs, from college.
The first thing that popped into my head was SSH, only the college firewall has putty (popular windows ssh client) blocked, along with most outgoing ports...
so, how could I accomplish this using the resources already available.. these being IE.. and um, nothing.. its IE or bust (fun)
well just tonight I decided I\'d make a lil web interface to execute programs on a system from any other remote system with a web browser and an internet connection.
this script will work on both windows/linux, possibly other operating systems providing PHP is installed... so without further ado...
[url=\"http://ner0.homelinux.com/dev/php/projects/ssh/index.phps\"]index.phps[/url] (index page, basic login system.)
[url=\"http://ner0.homelinux.com/dev/php/projects/ssh/ssh.phps\"]ssh.phps[/url] (handles login info and sets cookies as necessary (also the main interface for command execution))
[url=\"http://ner0.homelinux.com/dev/php/projects/ssh/sshexe.phps\"]sshexe.phps[/url] (main execution page, returns results etc in a suitable format (will only work if cookie present))
rename these files to have a .php extension, and place them all in the same directory on your php enabled webserver.. then edit the ssh.php file (where to edit is clearly indicated) to match your desired username/password combination
bear in mind that anyone accessing this script will have equal access to your system as that of PHP, so if your webserver/php runs as root, anyone accessing the script will have full access to init/rm/passwd functions... the security of this script is therefore a reason for concern...
[b]PLEASE NOTE: IT IS THE RESPONSIBILITY OF THE USER, AND NOT OF THE SCRIPT CREATOR OR KILLANET THAT THIS SCRIPT IS SECURED, USE *SHOULD* BE RESTRICTED USING METHODS BEYOND THE SCOPE OF THIS SCRIPT[/b]
The first thing that popped into my head was SSH, only the college firewall has putty (popular windows ssh client) blocked, along with most outgoing ports...
so, how could I accomplish this using the resources already available.. these being IE.. and um, nothing.. its IE or bust (fun)
well just tonight I decided I\'d make a lil web interface to execute programs on a system from any other remote system with a web browser and an internet connection.
this script will work on both windows/linux, possibly other operating systems providing PHP is installed... so without further ado...
[url=\"http://ner0.homelinux.com/dev/php/projects/ssh/index.phps\"]index.phps[/url] (index page, basic login system.)
[url=\"http://ner0.homelinux.com/dev/php/projects/ssh/ssh.phps\"]ssh.phps[/url] (handles login info and sets cookies as necessary (also the main interface for command execution))
[url=\"http://ner0.homelinux.com/dev/php/projects/ssh/sshexe.phps\"]sshexe.phps[/url] (main execution page, returns results etc in a suitable format (will only work if cookie present))
rename these files to have a .php extension, and place them all in the same directory on your php enabled webserver.. then edit the ssh.php file (where to edit is clearly indicated) to match your desired username/password combination
bear in mind that anyone accessing this script will have equal access to your system as that of PHP, so if your webserver/php runs as root, anyone accessing the script will have full access to init/rm/passwd functions... the security of this script is therefore a reason for concern...
[b]PLEASE NOTE: IT IS THE RESPONSIBILITY OF THE USER, AND NOT OF THE SCRIPT CREATOR OR KILLANET THAT THIS SCRIPT IS SECURED, USE *SHOULD* BE RESTRICTED USING METHODS BEYOND THE SCOPE OF THIS SCRIPT[/b]