Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Poison Null Protection


ghost's Avatar
0 0

Ok well I know it sounds like a noobish and simple question, but I'm looking for a simple way to prevent null byte injections in PHP.

I have looked around a little but I keep finding ways to exploit it rather than fix it.


clone4's Avatar
Perl-6 Wisdom Seeker
0 0

Sry not to give you help directly, but I don't know php very well… Anyway I googled string "prevent php null byte injections" without quotes and it returned some interesting I'd useful documents


Mr_Cheese's Avatar
0 1

a switch is deffinatly the way to go about it.

it's a long winded way of doing things, but by far the most secure.

example:

switch($_GET['page']){

case 'home':
  include "home.php";
break;

case 'contact':
 include "contact.php";
break;

default:
 include "home.php";

}```