3v4l.org

run code in 500+ PHP versions simultaneously
<?php function xor_encrypt($in) { $key = '<censored>'; $text = $in; $outText = ''; // Iterate through each character for($i=0;$i<strlen($text);$i++) { $outText .= $text[$i] ^ $key[$i % strlen($key)]; } return $outText; } $cookies ="EGAgHwQ1IxYYMSQYGSZxTUksPFVHYDEQCC0%2FGBlgaVVIJDURDSQ1VRY%3D"; $urlC = urldecode($cookies); $guess_key = ''; for ($i = 0; $i < strlen($known_plain); $i++) { $guess_key .= $cipher[$i] ^ $known_plain[$i]; } echo $guess_key; $step1 = base64_decode($urlC); $known_plain = '{"showpassword":"no"'; $tempdata = json_decode(xor_encrypt(base64_decode($urlC)), true);

preferences:
28.65 ms | 477 KiB | 4 Q