include secure| see demonstration of include secure
This checks the name of the PHP file currently executing.
If it is crackme.php , then the program dies before it gets to important code,
because you didn't intend for anyone to execute this file on its own.
If it is included in some other PHP file,
then the $PHP_SELF variable will be something other than crackme.php,
and the program will continue to execute.
full source of include secure [ line 1 - 5 ] | download include secure
|2||if (eregi("crackme.php", $PHP_SELF)) exit;|
|3||// this is for demonstration only|
|4||if (eregi("include_secure", $PHP_SELF)) echo "this file shouldn't be called like this";|
8 hits by 6 users in the last 30 minutes.