Is your host noobish? Use this script to test.

Status
Not open for further replies.

NewEraCracker

Active Member
1,335
2010
203
10
The developement of this script has been moved to github:
Code:
https://raw.github.com/NewEraCracker/php_work/master/noobish_host.php

v2.5.5
PHP:
<?php
/* 
	iS MA HOS' NOOBISH? v2.5.5
	@author   NewEraCracker
	@date     2011/07/10
	@license  Public Domain
	@notes    newfags can't triforce
*/

// Config
$functionsToBeDisabled = array('link', 'symlink', 'system', 'shell_exec', 'passthru', 'exec', 'pcntl_exec', 'popen', 'proc_close', 'proc_get_status', 'proc_nice', 'proc_open', 'proc_terminate');
$functionsToBeEnabled = array('php_uname', 'base64_decode', 'fpassthru', 'ini_set');

// Init
$crlf = "\r\n";
$disabledFunctions = array_map("trim", explode(",",@ini_get("disable_functions")));
$issues = array();

// Functions to be disabled
foreach ($functionsToBeDisabled as $test)
{
	if(function_exists($test) && !(in_array($test, $disabledFunctions)))
	{
		$issues[] = "Function ".$test." should be disabled!";
	}
}
unset($test);

// Functions to be enabled
foreach ($functionsToBeEnabled as $test)
{
	if(!function_exists($test) || in_array($test, $disabledFunctions))
	{
		$issues[] = "Function ".$test." should be enabled!";
	}
}
unset($test);

// Do we have access to eval?
if( in_array("eval", $disabledFunctions) )
{
	$issues[] = "Language construct eval is required to be enabled in PHP!";
}

// dl (in)security
if( function_exists('dl') && !(in_array('dl', $disabledFunctions)) )
{
	if (ini_get('enable_dl'))
	{
		$issues[] = "enable_dl should be Off!";
	}
}

// Safe mode?
if (ini_get('safe_mode')) { $issues[] = "Issue: safe_mode is On!"; }

// magic_quotes_gpc?
if (ini_get('magic_quotes_gpc')) { $issues[] = "Issue: magic_quotes_gpc is On!"; }

// Output results
echo "<pre>";
if( !count($issues) )
{
	echo "Host is not noobish! Ready for use!";
}
else
{
	echo "Your host scored ".count($issues)." noobish points!".$crlf.$crlf;

	foreach($issues as $issue)
	{
		echo "Issue: {$issue}".$crlf;
	}
	unset($issue);
}
echo "</pre>";
?>
 
Last edited:
47 comments
It checks php configuration for disabled and enabled functions.

v2.1.
A good configuration would result in this output
Code:
WOW! HOST IS NOT NOOBISH! READY FOR USE!

A less good configuration would result in this output
Code:
CONGRATULATIONS!!! YOUR HOS' SCORED 1 - THATS FUCKIN' AWESOME!!!

v2.2.
A good configuration would result in this output
Code:
Wow! Host is not noobish! Ready for use!

A less good configuration would result in this output
Code:
Congratulations!!! Your host scored 1, check php.ini if you don't mind!

---
I advise if you get higher than one to review php.ini closely.
 
Nice script :P
but,
enabling/ disabling few php functions doesn't make the hosting provider a geek / noob ..
there are many more factors which has to be taken into account .
and whats the use of disabling php functions , when people need it..
a good server admin has to give access to those functions and at the same time, he should take care of the effects that the functions may cause. .

*cough* chroot *cough*
 
ss20101031221836.png
 
If you post here that your host is a nub you will get hackers checking out all sites on the server trying to attach a shell :)
 
Because NewEraCracker won't say, I will, its all about getting a low score than getting a high one.

It checks php configuration for disabled and enabled functions.

A good configuration would result in this output
Code:
WOW! HOST IS NOT NOOBISH! READY FOR USE!

A less good configuration would result in this output
Code:
CONGRATULATIONS!!! YOUR HOS' SCORED 1 - THATS FUCKIN' AWESOME!!!

I advise if you get higher than one to review php.ini closely.

8-) 8-)
 
Is this the same test as some php prober scripts? There're VPS benchmark scripts discussed before but don't know if they can test shared hosts.
 
Status
Not open for further replies.
Back
Top