voodooKobra

Lame hack solution

Jun 27th, 2013
491
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?
  2. $text = 'wallpost-'.md5(`cat /etc/hostname`);
  3. switch($text) {
  4.   case 'a':
  5.     echo "A\n";
  6.     break;
  7.   case 'b':
  8.     echo "B\n";
  9.     break;
  10.   case preg_match('/^wallpost-([0-9a-f]+)$/', $text, $what)?$text:'':
  11.     echo "{$text}\n";
  12.     var_dump($what);
  13.     break;
  14.   case 'd':
  15.     echo "D\n";
  16.     break;
  17.   default:
  18.     echo "NO";
  19.     break;
  20. }
  21. ?>
  22.  
  23. I'm a bit appalled that this solution actually works. BRB shower
Add Comment
Please, Sign In to add comment