Skip to content

Instantly share code, notes, and snippets.

@eazyliving
Created July 22, 2014 21:09
Show Gist options
  • Save eazyliving/6283144d0d6f944aa404 to your computer and use it in GitHub Desktop.
Save eazyliving/6283144d0d6f944aa404 to your computer and use it in GitHub Desktop.
crypt bug
<?php
$salt = "Salz in der Suppe";
$url1 = "http://g";
$url3 = "http://b";
$url2 = "http://gibtsnicht.eazy-living.de/?p=92";
echo "salt: $salt<br>";
echo $url1.": ".crypt($url1,$salt)."<br>";
echo $url2.": ".crypt($url2,$salt)."<br>";
echo $url3.": ".crypt($url3,$salt)."<br><br>";
echo "ohne salt";
echo $url1.": ".crypt($url1)."<br>";
echo $url2.": ".crypt($url2)."<br>";
echo $url3.": ".crypt($url2)."<br>";
?>
Output:
salt: Salz in der Suppe
http://g: SaKmZp3y.P.fk
http://gibtsnicht.eazy-living.de/?p=92: SaKmZp3y.P.fk
http://b: SaUYF3cTKRceo
ohne salthttp://g: $1$ikJXuLa3$hH8sEfOw.XEnNKVRDvq3L0
http://gibtsnicht.eazy-living.de/?p=92: $1$WCgPltML$dSwsA5ZNHurwS/SSxh3Mm0
http://b: $1$vgWC3qrw$uKpblGu.qrERRZlxA2X3b/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment