Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function unlockCode($imei) {
- $imeiMD5 = md5($imei, true);
- $unlockCode = "";
- for ($i = 0; $i < 8; $i++) {
- $magicalSum = (ord($imeiMD5[$i]) + ord($imeiMD5[$i + 8])) & 0xFF;
- $unlockCode .= chr(($magicalSum * 9) / 255 + 48);
- }
- return $unlockCode;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement