note 3616 modified in crypt by ronabop

From: Date: Fri, 11 Aug 2000 17:27:15 +0000
Subject: note 3616 modified in crypt by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1320@lists.php.net to get a copy of this message
With this code you can make your one encrypting. Put it in a file xor.php3: The code is: dfgsdfg452 The first xor: abcde The second xor: edcba $i = "dfgsdfg452"; $s = "abcde"; $p = "edcba"; for($x=0; $x < strlen($i); $x++) { $i[$x] = chr(ord($i[$x]) ^ ord($s[$x % strlen($s)]) ^ ord($p[$x % strlen($p)])); } echo "<form method='POST' action='xor.php3'>"; echo "<input type='text' name='encrip' value='$i'>"; echo "<input type='submit' name='Submit' value='a'>"; echo "</form>"; if ( $Submit == "a") { $k = $encrip; $l = "abcde"; $p = "edcba"; for($x=0; $x < strlen($k); $x++) { $k[$x] = chr(ord($k[$x]) ^ ord($l[$x % strlen($l)]) ^ ord($p[$x % strlen($p)])); } echo"$k"; echo"dfgsdfg452"; } the result is: <form method='POST' action='xor.php3'><input type='text' name='encrip' value='`guba436'><input type='submit' name='Submit' value='a'></form> dfgsdfg452 dfgsdfg452 http://www.php.net/manual/function.crypt.php

« previous php.notes (#1320) next »