[Skip To Content]


# a good interview question for a php developer

  1. $ cat test.php
  2. <?
  3. if( !isset($_GET['filename']) || strpos($_GET['filename'],"../") ) {
  4. die();
  5. }
  6. echo "Hacked.";
  7. ?>
  8. $ wget -q -O/dev/stdout http://localhost/test.php?filename=../../../../etc/hosts
  9. Hacked.

Get them to explain why you’re hacked. If they don’t know, don’t give them the job.

  1. 10:10 <carldr> I thought you were waiting for stuff to do, which is why you
  2. were fannying about.
  3. 10:11 <steven> heh, i was looking up the .exists? method
  4. 10:11 <carldr> On the playstation site?
  5. 10:13 <steven> and looking when new games are out on the playstation network :)

More about this site...

Last Week’s Top 5 Albums (More »)

  1. Conor OberstConor Oberst
  2. Cruel TownBroder Daniel
  3. Far From the Maddening CrowdsChicane
  4. The Midnight Organ FightFrightened Rabbit
  5. Perfect CureLorraine