![]() | Join Date: Oct 2006 | Posts: 144 |
execute php from your browser
I mess up a lot when writing a script and it get's tiresome uploading a php file over and over again just to test one little thing.
I wrote this simple but highly insecure script that'll execute php that you typed into a texarea.
I did use a conditional to check if the user's user ID is 1.
I wrote this simple but highly insecure script that'll execute php that you typed into a texarea.
I did use a conditional to check if the user's user ID is 1.
PHP Code:
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
// #################### HARD CODE JAVASCRIPT PATHS ########################
$headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude);
// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################
if($vbulletin->userinfo['userid'] != 1)
{
print_no_permission();
}
if(empty($_REQUEST['do']))
{
$_REQUEST['do'] = "main";
}
if($_REQUEST['do'] == "main")
{
echo "<form action='?do=run' method='post'>
<textarea cols='88' rows='33' name='phpcode'></textarea><br />
<input type='submit' value='Submit' />
</form>";
}
if($_REQUEST['do'] == "run")
{
$vbulletin->input->clean_array_gpc('p', array(
'phpcode' => TYPE_STR
));
eval($vbulletin->GPC['phpcode']);
}
--------------------
vHosting Pro
Manage you hosting requests easier
Xen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more
vHosting Pro
Manage you hosting requests easier
Xen Web Hosting
Offering ad-free hosting with features such as, cpanel, fantastico, PHP and MySQL support, and more





Linear Mode

