3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php // TARP KABUCIU IRASYKITE DESIFRUOJAMA SLAPTAZODI $slaptazodis = 'cITUL9Rx5++0imTIEhYqLVrAVzhaNry2ii4hbDv09m+f98c4DfnJftgxmQeCcakeWivN7XOIpnAAtYJQZhu+aQTM7283KxmBMGzmP9imP3471Rj+wlVQBW9szBZHAlui|xgMujuFaxPNhAIh1Oz+px2LaMga+lFMmwqwCiHTxPQk='; // TARP KABUCIU IRASYKITE DESIFRAVIMO RAKTA $raktas = '6723285221633e516d3d404c66686a2c51294530776b21277a245d664d5d664d'; // NEKEISKITE NIEKO ZEMIAU SIOS EILUTES echo '=== ATSAKYMO PRADZIA ===' . PHP_EOL; echo mc_decrypt($slaptazodis, $raktas) . PHP_EOL; echo '=== ATSAKYMO PABAIGA ==='; // DESIFRAVIMO FUNKCIJA function mc_decrypt($decrypt, $key){ $decrypt = explode('|', $decrypt.'|'); $decoded = base64_decode($decrypt[0]); $iv = base64_decode($decrypt[1]); if(strlen($iv)!==mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_CBC)){ return false; } $key = pack('H*', $key); $decrypted = trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $decoded, MCRYPT_MODE_CBC, $iv)); $mac = substr($decrypted, -64); $decrypted = substr($decrypted, 0, -64); $calcmac = hash_hmac('sha256', $decrypted, substr(bin2hex($key), -32)); if($calcmac!==$mac){ return false; } $decrypted = unserialize($decrypted); return $decrypted; }
based on 0Gsr4
Output for 7.0.6 - 7.2.0
=== ATSAKYMO PRADZIA === Fatal error: Uncaught Error: Call to undefined function mcrypt_get_iv_size() in /in/KWrEo:19 Stack trace: #0 /in/KWrEo(11): mc_decrypt(Array, '6723285221633e5...') #1 {main} thrown in /in/KWrEo on line 19
Process exited with code 255.
Output for 5.4.0 - 5.5.34, 5.6.8 - 5.6.20, 7.0.0 - 7.0.5
=== ATSAKYMO PRADZIA === 10zem3431pav30 === ATSAKYMO PABAIGA ===
Output for 5.3.19 - 5.3.29, 5.5.35, 5.6.21 - 5.6.28
=== ATSAKYMO PRADZIA === Fatal error: Call to undefined function mcrypt_get_iv_size() in /in/KWrEo on line 19
Process exited with code 255.