<?PHPHeader("content-type:text/html; CHARSET=GBK ");><form action= "post.php" method= "POST" ><input type= "text" name= "content" value= "" ><input type= " Submit "value=" Submission "></FORM><?"PHP//$a =authcode ($_post[' content '), "DECODE");$a=$_post[' Content '];$a=authcode ($a, "DECODE"); Echo $a;functionAuthcode ($string,$operation= "ENCODE",$key= "",$expiry= 0) { $ckey _length= 4; $key=MD5($key?$key: "Default_key"); $keya=MD5(substr($key, 0, 16)); $keyb=MD5(substr($key, 16, 16)); $KEYC= ($ckey _length? ($operation= = "DECODE"?substr($string, 0,$ckey _length) :substr(MD5(Microtime()), -$ckey _length)) : ""); $cryptkey=$keya.MD5($keya.$KEYC); $key _length=strlen($cryptkey); $string= ($operation= = "DECODE"?Base64_decode(substr($string,$ckey _length)) :sprintf("%010d",$expiry?$expiry+ Time(): 0).substr(MD5($string.$keyb), 0, 16).$string); $string _length=strlen($string); $result= ""; $box=Range(0, 255); $rndkey=Array(); for($i= 0;$i<= 255;$i++) { $rndkey[$i] =Ord($cryptkey[$i%$key _length]); } for($j=$i= 0;$i< 256;$i++) { $j= ($j+$box[$i] +$rndkey[$i])% 256; $tmp=$box[$i]; $box[$i] =$box[$j]; $box[$j] =$tmp; } for($a=$j=$i= 0;$i<$string _length;$i++) { $a= ($a+ 1)% 256; $j= ($j+$box[$a])% 256; $tmp=$box[$a]; $box[$a] =$box[$j]; $box[$j] =$tmp; $result.=CHR(Ord($string[$i]) ^$box[($box[$a] +$box[$j])% 256]); } if($operation= = "DECODE") { if(((substr($result, 0, 10) = = 0) | | (0 < (substr($result, 0, 10)- Time()))) && (substr($result, 10, 16) = =substr(MD5(substr($result, 26).$keyb), 0, 16))) { return substr($result, 26); } Else { return""; } } Else { return $KEYC.Str_replace("=", "",Base64_encode($result)); }}?>
One time to fix a pyramid scheme, see the algorithm, decryption as above.
A password decryption script for a funds tray program