3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Huawei E303 | E369 | E357 Free Unlocker * **/ class hw { public function calculate($imei, $mode){ $arrayofbytes = array(); $digesthash = md5($imei.$this->mode($mode)); $arrayofbytes = $this->bytearray($digesthash); return $this->xorbytes($arrayofbytes); } private function mode($arg){ $this->unlock = "5e8dd316726b0335"; $this->flash = "97b7bc6be525ab44"; if($arg == 'unlock'){ return $this->unlock; } else{ return $this->flash; } } private function bytearray($hash){ $splitdigest = substr(chunk_split($hash,2,":"),0,-1); $arrdigest = explode(":",$splitdigest); return $arrdigest; } private function xorbytes($arr){ foreach (range(0,3) as $i) { $code = dechex(hexdec($arr[$i]) ^ hexdec($arr[4+$i]) ^ hexdec($arr[8+$i]) ^ hexdec($arr[12+$i])); if(strlen($code)< 2) { $code = "0" . $code; } $codes = $codes . $code; } $tmpcdec = hexdec($codes); $tmp1dec = hexdec("1ffffff"); $tmp2dec = hexdec("2000000"); $c = $tmpcdec & $tmp1dec; $c = $c | $tmp2dec; return $c; } } echo "<head><title>Huawei Code Calculator</title></head> Huawei E303 | E369 | E357 Code calculator<br><br>"; $imei = htmlspecialchars($_POST['imei']); $hw = new hw(); if(strlen($imei) == 15){ $imei = htmlspecialchars($imei); echo "Results:<br>"; echo "Unlock ". $hw->calculate($imei,"unlock"); echo "<br>"; echo "Flash ".$hw->calculate($imei,"flash"); } else{ if($imei < 15 && $imei > 1) { echo "Error : Invalid IMEI"; } else { echo "Enter imei on box to calculate"; } } echo "<br><br> <form method='post' action=''> IMEI : <input type='text' name='imei' maxlength='15'><br> <input type='submit' value='CALCULATE'> </form>"; echo "<hr>"; echo "Credits to Original algo sharer<br> Script Kiddie PHP<br>"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
<head><title>Huawei Code Calculator</title></head> Huawei E303 | E369 | E357 Code calculator<br><br> Warning: Undefined array key "imei" in /in/cOmU1 on line 58 Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /in/cOmU1 on line 58 Enter imei on box to calculate<br><br> <form method='post' action=''> IMEI : <input type='text' name='imei' maxlength='15'><br> <input type='submit' value='CALCULATE'> </form><hr>Credits to Original algo sharer<br> Script Kiddie PHP<br>

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
54.42 ms | 407 KiB | 5 Q