3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function microtime_float() { return microtime(true); } function checkValid($minPlain, $maxPlain, $curPlain, $i) { $valid = 0; if ($i % 20 == 19 && $minPlain >= -5 && $minPlain <= 10) { $valid = 1; } else if ($i % 4 == 3 && $minPlain >= 30 && $minPlain <= 45) { $valid = 1; } else if ($i % 20 == 17 && $minPlain >= 31 && $minPlain <= 46) { $valid = 1; } else if ($minPlain >= 33 && $minPlain <= 90 && ord($curPlain) >= $minPlain && ord($curPlain) <= $maxPlain && ord($curPlain) <= 90) { $valid = 1; } return ($valid); } function evalCrossTotal($strMD5) { $intTotal = 0; $arrMD5Chars = str_split($strMD5, 1); foreach ($arrMD5Chars as $value) { $intTotal += '0x0' . $value; } return $intTotal; } function arrayToString($array) { $string = implode("", $array); return $string; } function findFirstPlain($minPlain, $maxPlain) { $curPlain = chr($minPlain); if ($minPlain >= 33 && $minPlain <= 90) { if ($minPlain <= 48) $curPlain = "0"; else if ($minPlain > 57 && $minPlain <= 65) $curPlain = "A"; } return ($curPlain); } function increasePlain(&$curPlain) { if ($curPlain == "9") $curPlain = "A"; else $curPlain = chr(ord($curPlain) + 1); } function decryptString() { $str = "-149 -203 -143 -178 -161 -178 -146 -164 -149 -151 -112 -222 -190 -134 -174 -174 -242 -242 -192 -202 -182 -110 -186 -231 -109 -153 -222 -148 -139 -142 -126 -219 -152 -149 -141 -212 -152 -167 -156 -191 -208 -196 -169 -176 -124 -195 -150 -178 -181 -140 -100 -194 -201 -162 -178 -207 -196 -170 -182 -259 -172 -166 -118 -217 -141 -154 -181 -152 -131 -117 -189 -188 -166 -133 -197 -194 -193 -177 -172 -206 -114 -190 -166 -138 -181 -99 -140 -168 -120 -156 -183 -165 -185 -144 -207 -165 -193 -153 -180 -224"; $Enc = split(' ', $str); $IntMD5 = array(); $minPlain = array(); $maxPlain = array(); $curPlain = array('0', '0', '0', '-', '0', '0', '0', '-', 'O', 'E', 'M', '-', '0', '0', '0', '-', '1', '.', '1', "\n", '0', '0', '0', '-', '0', '0', '0', '-', 'O', 'E', 'M', '-', '0', '0', '0', '-', '1', '.', '1', "\n", '0', '0', '0', '-', '0', '0', '0', '-', 'O', 'E', 'M', '-', '0', '0', '0', '-', '1', '.', '1', "\n", '0', '0', '0', '-', '0', '0', '0', '-', 'O', 'E', 'M', '-', '0', '0', '0', '-', '1', '.', '1', "\n", '0', '0', '0', '-', '0', '0', '0', '-', 'O', 'E', 'M', '-', '0', '0', '0', '-', '1', '.', '1', "\n" ); $maxIntMD5 = 90 - $Enc[0] + 15; $minIntMD5 = 48 - $Enc[0]; //$minIntMD5=215; $IntMD5[0] = $minIntMD5; $minPlain[0] = $IntMD5[0] + $Enc[0] - 15; $maxPlain[0] = $IntMD5[0] + $Enc[0]; $curPlain[0] = findFirstPlain($minPlain[0], $maxPlain[0]); $inRange = checkValid($minPlain[0], $maxPlain[0], $curPlain[0], 0); for ($i = 0;;) { if (checkValid($minPlain[$i], $maxPlain[$i], $curPlain[$i], $i)) { if ($i == 99) { //print arrayToString($curPlain).''; break; } $i++; $IntMD5[$i] = evalCrossTotal(substr(md5(substr(arrayToString($curPlain), 0, $i)), 0, 16) . substr(md5($IntMD5[$i - 1]), 0, 16)); $minPlain[$i] = $IntMD5[$i] + $Enc[$i] - 15; $maxPlain[$i] = $IntMD5[$i] + $Enc[$i]; if ($i % 4 != 3 && $i % 20 != 8 && $i % 20 != 9 && $i % 20 != 10 && $i % 20 != 16 && $i % 20 != 17 && $i % 20 != 18 && $i % 20 != 19) { $curPlain[$i] = findFirstPlain($minPlain[$i], $maxPlain[$i]); //print ord($curPlain[$i]).""; } } else { //print " <<< ".ord($curPlain[$i])." ".$minPlain[$i]." ".$maxPlain[$i].""; if ($i != 0) { if ($i % 4 != 3 && $i % 20 != 8 && $i % 20 != 9 && $i % 20 != 10 && $i % 20 != 16 && $i % 20 != 17 && $i % 20 != 18 && $i % 20 != 19) $curPlain[$i] = 0; $i--; if ($i != 0) { if ($i % 4 == 3) $i--; if ($i % 20 == 8 || $i % 20 == 16) $i = $i - 2; else if ($i % 20 == 9 || $i % 20 == 17) $i = $i - 3; else if ($i % 20 == 10 || $i % 20 == 18) $i = $i - 4; } increasePlain($curPlain[$i]); } else { $IntMD5[0]++; $minPlain[0] = $IntMD5[0] + $Enc[0] - 15; $maxPlain[0] = $IntMD5[0] + $Enc[0]; $curPlain[0] = findFirstPlain($minPlain[0], $maxPlain[0]); } } } return (arrayToString($curPlain)); } set_time_limit(0); $start = microtime_float(); print decryptString(); $stop = microtime_float(); print " "; print $stop - $start; ?>
Output for 5.3.0 - 5.4.13
Deprecated: Function split() is deprecated in /in/fkuKT on line 48
Process exited with code 137.