Tuesday, September 9, 2008

Code reuse, Prison Break style.

The Original Code (http://tutorial.jcwcn.com/Web-Design/PHP/User-Authentication/2007-08-24/3014.html)


$getUser = mysql_query("SELECT ID, Username, Email, Random_key FROM users WHERE Username = '".mysql_real_escape_string($_POST['username'])."'") or die(mysql_error());

if(mysql_num_rows($getUser)==1)
{//there's only one MATRIX :PP

$row = mysql_fetch_assoc($getUser);
$headers = 'From: webmaster@ourdomainhere.com' . "\r\n" .
'Reply-To: webmaster@ourdomainhere.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();


The Prison Break Season 4 Episode 3 Fork (around 16:26 mark)




Huh?

They've simply replaced a few things, e.g.:
$ with z*
mysql with XFER[]
_POST with _GEN

Other recycled text seen in the episode seems to be from the Columbia Physics System Documentation (http://qcdoc.phys.columbia.edu/doxygen/ref/html)

No comments: