|
Welcome to the GSM-Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Only registered members may post questions, contact other members or search our database of over 8 million posts. Registration is fast, simple and absolutely free so please - Click to REGISTER! If you have any problems with the registration process or your account login, please contact contact us . |
|
Register | FAQ | Donate | Forum Rules | Root any Device | ★iPhone Unlock★ | ★ Direct Codes ★ | Direct Unlock Source |
GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets. |
| LinkBack | Thread Tools | Display Modes |
06-16-2011, 21:33 | #49 (permalink) |
Freak Poster Join Date: Jan 2005 Location: France
Posts: 199
Member: 103520 Status: Offline Thanks Meter: 17 | I don't know if it's a good job but i wase very funy just take the very good howto on this thread, open your oO calc and do it step by step. It will give you the base of how it work and how to do it with other tool. it's not very hight math level but you need to know what is a modulo I will now do it with PHP I kow someone have already post it in php but it's a 100 lines long code to do something very simple. sory for Pascal, turboXX, VB, or other microchit plateform language but I'm linux lover :-) |
06-16-2011, 22:01 | #51 (permalink) |
Freak Poster Join Date: Jul 2008
Posts: 403
Member: 821558 Status: Offline Thanks Meter: 31 | IMEI los modelos: SFR 114 SFR 231 SFR 232 SFR 241 SFR 251 SFR 341 SFR 342 SFR 343 SFR Messenger Edition 251 Orange Vegas Vodafone Indie Vodafone 547 Vodafone 541 TMN 5000 ZTE SAGE ZTE A261+ ZTE X760 ZTE X761 ZTE X960 ZTE X990 ZTE GX760 ZTE GX761 ZTE GR230 ZTE N281 T-Mobile Vairy Touch |
06-17-2011, 03:05 | #54 (permalink) |
No Life Poster Join Date: Sep 2005 Location: Resign
Posts: 525
Member: 177036 Status: Offline Thanks Meter: 934 | yes moron its all free now.. did you read first where section you enter Gsm Programming & Reverse Engineering the topic is how to create unlocker soft not looking for unlocker |
06-17-2011, 03:50 | #55 (permalink) |
Freak Poster Join Date: Jan 2005 Location: France
Posts: 199
Member: 103520 Status: Offline Thanks Meter: 17 | PHP version Just save it as mypage.php on your server and open it by http://mysite/mypage.php?imei=xxxxxxxxxxxxxxxx It's possible to make it shorter for example without the three loops and the comments. But more easy to understain as it for php novice <? //Code by Comdif-Telecom// $imei=$_GET['imei']; //remove 3 first digit $a=substr($imei, 3); echo 'Use 12 last IMEI digits: '.$a.'<br/>'; // make digit's sum starting with value 0 and make a loop for 13 time to increment the value $sum=0; for ($i=0;$i<12;$i++) { $x=substr($a, $i,1); $sum= ($sum + $x); } //display the sum echo 'Sum digits: '.$sum.'<br/>'; //make a loop to give a VAR value to eatch digit digits must be modulo of IMEI digit X Sum for ($i=0;$i<12;$i++) { $x=(((substr($a, $i,1) * $sum)) % 10); define("A".$i."", $x); } // Display the first magic string echo 'FIRST - STEP: ';echo A0;echo A1;echo A2;echo A3;echo A4;echo A5;echo A6;echo A7;echo A8;echo A9;echo A10;echo A11; // Function to replace some digits by other will be used later function replace ($string) { $table = array('1'=>'8', '2'=>'6', '3'=>'4', '4'=>'2', '5'=>'0', '6'=>'8', '7'=>'6', '8'=>'4', '9'=>'2', '0'=>'0'); return strtr($string, $table); } //make a loop to have all IMEI digits defined as a VAR for ($i=0;$i<12;$i++) { $z=substr($a, $i,1); define("B".$i."", $z); } //To display the second magic string need to use the function replace and order them starting with the last echo '<br/>Second- STEP: '; echo replace(B11);echo replace(B10);echo replace(B9);echo replace(B8);echo replace(B7);echo replace(B6);echo replace(B5);echo replace(B4);echo replace(B3); echo replace(B2);echo replace(B1);echo replace(B0); //This is the magic constant number echo '<br/>Magic- number: 688950000000'; //OK calculate NCK with sum modulo of the three strings echo'<div align=center> <strong>NCK/NP Code - '.((A0 + replace(B11) + 6) % 10).' '.((A1 + replace(B10) + 8) % 10).' '.((A2 + replace(B9) + 8) % 10).' '.((A3 + replace(B8) + 9) % 10).' '.((A4 + replace(B7) + 5) % 10).' '.((A5 + replace(B6) + 0) % 10).' '.((A6 + replace(B5) + 0) % 10).' '.((A7 + replace(B4) + 0) % 10).' '.((A8 + replace(B3) + 0) % 10).' '.((A9 + replace(B2) + 0) % 10).' '.((A10 + replace(B1) + 0) % 10).' '.((A11 + replace(B0) + 0) % 10).'</strong></div>'; echo'<br/><div align=center><strong><a href='.$_SERVER['PHP_SELF'].'>Go Back</a></strong></div>'; ?> |
06-17-2011, 15:51 | #56 (permalink) |
Freak Poster Join Date: Jan 2005 Location: France
Posts: 199
Member: 103520 Status: Offline Thanks Meter: 17 | And this is education version for peoples who whant to learn some PHP and HTLM base. <? //Code by Comdif-Telecom unlock ZTE PHONE and learn php// // first lesson php code start always with <? in top of code each instruction line or instruction line writed on multi line finish with ; // line starting with // are just comment you can remove it for final version you can also use the /* and */ balise for multiline comment as above /* let's start with echo instruction echo does mean write in the page d'ont forget finaly ouptut page will be simple html code if you put start ' and end ' after echo it does mean take it as texte so I start with simple html balises like <div align="center"> and as in html balise is take as a balise and not displayed in page, ok let's go */ // first send a html balise just to center echo'<div align="center">'; /* create a form you have to indicate methode GET or POST get methode create link like http://server/page.php?imei=xxxxxxxxxx and post send request without display the IMEI var it's more secure depending what you whant to do you can see I close the ' and make something like '.PHP var.' it does mean I whant this part of echo line to not be taked as texte but real php value action in form is used to indicate on what page you whant to send request: $_SERVER['PHP_SELF'] is same as HTML #SELF it does mean on same page if you what to have separate page with the form and script just make something like <form action="script_page.php" method="get"> */ echo'<form action="'.$_SERVER['PHP_SELF'].'" method="get">'; // create here an imput text box and give the var name imei by this way when sending it will have the imei=value of the text box page.php?imei=xxxxxxxxxx echo'IMEI: <input type="text" name="imei" />'; // just add here the buton to send the form and close the form echo'<input type="submit" /></form>'; // close the first html instruction echo'</div>'; // Second step script to make calcul based on sent IMEI just start with a check if imei value is received so use the if instruction // you can see I use the ! before empty ! is a comparator in php it does mean not equal or different so !empty does mean not empty :-) if((!empty($_GET['imei'])) //after if you have to englobe all instructions to be executed with starting { and ending } { // just receive the imei sending by form and put it in a var named $imei $imei=$_GET['imei']; // remove 3 first digit of $imei with the substr function substr($imei, 3) does mean take the var value starting by the digit 3 // digit 3 is in fact the 4th because substr count starting with 0 like that 0,1,2,3 $a=substr($imei, 3); // so you have now only 12 digits and use echo to display, <br/> does mean go to next line echo 'Use 12 last IMEI digits: '.$a.'<br/>'; // start by giving a value o to a $sum variable $sum=0; //we need to make the sum of eatch 12 last imei digit so run 12 operation using the for instruction to make 12 loop // give a first value = 0 to a $i variable then indicate this variable must stay < 12 and tell it to increment of 1 on eatch loop ($i=0;$i<12;$i++) for ($i=0;$i<12;$i++) // loop instructions have to start with { and end with } { // make a var named $x and use the substr instruction substr($a, $i,1) $a is our 12 digit var, $i will have value on first loop 0, 1 on second loop, .. // and 1 is the limited selected digits so on eatch loop we will have next digit value for $x $x=substr($a, $i,1); // now just add the digit value to $sum variable $sum= ($sum + $x); // close the loop with } } //display the sum witch is normaly now after the loop digit1 + digit2 +digit3 ... magic :-) echo 'Sum digits: '.$sum.'<br/>'; //make again 12 loop to give a new value to eatch digit for ($i=0;$i<12;$i++) { // you surely know math and I will not give you a lesson for priority and () use // the goal is to mult each digit substr($a, $i,1) with the $sum value and take only the modulo (last digit) so in php modulo is % // number % 10 is take the modulo of number divided by 10 $x=(((substr($a, $i,1) * $sum)) % 10); // we have to create a var containing eatch calculate digit ($x) I use the $i to otain a var named A1 on first loop, A2 on second, .. define("A".$i."", $x); } // Good we have now 12 var named A1, A2, .. just display the first magic string echo 'FIRST - STEP: ';echo A0;echo A1;echo A2;echo A3;echo A4;echo A5;echo A6;echo A7;echo A8;echo A9;echo A10;echo A11; // Function to replace some digits by other will be used later function is declared with "function name($var) and start with { end with } // this function is easy to understain if you call it it will replace for example '1'=>'8' 1 with 8 function replace ($string) { $table = array('1'=>'8', '2'=>'6', '3'=>'4', '4'=>'2', '5'=>'0', '6'=>'8', '7'=>'6', '8'=>'4', '9'=>'2', '0'=>'0'); return strtr($string, $table); } // make a loop to have all IMEI digits defined as a VAR becaus we have not do it before and give them a value B1, B2, B3, .. for ($i=0;$i<12;$i++) { $z=substr($a, $i,1); define("B".$i."", $z); } //To display the second magic string in good order we need to use the function replace and order them starting with the last digit echo '<br/>Second- STEP: '; // That's simple if B11 is 1 it will be replaced by 8 because we call the replace function echo replace(B11);echo replace(B10);echo replace(B9);echo replace(B8);echo replace(B7);echo replace(B6);echo replace(B5);echo replace(B4);echo replace(B3); echo replace(B2);echo replace(B1);echo replace(B0); // This is the magic constant number for this model just display it echo '<br/>Magic- number: 688950000000'; //OK ready to make calcul for NCK just ad 1st digit of first calculate string with 12 th digit of second calculat string and first digit of magic number // as we have to invert the second string and finaly take the modulo, make it for eatch digit and finaly // display it :-) echo'<div align=center> <strong>NCK/NP Code - '.((A0 + replace(B11) + 6) % 10).' '.((A1 + replace(B10) + 8) % 10).' '.((A2 + replace(B9) + 8) % 10).' '.((A3 + replace(B8) + 9) % 10).' '.((A4 + replace(B7) + 5) % 10).' '.((A5 + replace(B6) + 0) % 10).' '.((A6 + replace(B5) + 0) % 10).' '.((A7 + replace(B4) + 0) % 10).' '.((A8 + replace(B3) + 0) % 10).' '.((A9 + replace(B2) + 0) % 10).' '.((A10 + replace(B1) + 0) % 10).' '.((A11 + replace(B0) + 0) % 10).'</strong></div>'; // NCK is displayed now just put a link to return on original page without imei defined echo'<br/><div align=center><strong><a href='.$_SERVER['PHP_SELF'].'>Go Back</a></strong></div>'; // End of second step script this part of script is not displayed and displayed if the $_GET['imei'] variable don't exist //close this part with ending } } // close php code ?> |
07-06-2012, 08:19 | #57 (permalink) |
No Life Poster Join Date: Aug 2008 Location: The Matrix :) Age: 36
Posts: 654
Member: 833760 Status: Offline Sonork: 100.1597150 Thanks Meter: 114 | LOL my vesrion from pseudo code is a little different Code: <? function magicChart ($in) { for ($i = 0; $i < count($in); $i++){ switch ($in[$i]) { case 1: $out[$i] = 8; break; case 2: $out[$i] = 6; break; case 3: $out[$i] = 4; break; case 4: $out[$i] = 2; break; case 5: $out[$i] = 0; break; case 6: $out[$i] = 8; break; case 7: $out[$i] = 6; break; case 8: $out[$i] = 4; break; case 9: $out[$i] = 2; break; case 0: $out[$i] = 0; break; } } $out = array_reverse($out); return $out; } function zteX760 ($imei) { $magicNums = array(6,8,8,9,5,0,0,0,0,0,0,0); $imei_digits = $imei = str_split(substr($imei, -12), 1); $sum_imei = array_sum($imei_digits); for ($i = 0; $i < 12; $i++) { $xsum[$i] = substr($imei_digits[$i] * $sum_imei, -1); } $imei_a = magicChart(array_slice($imei_digits, 0, 6)); $imei_b = magicChart(array_slice($imei_digits, 6)); $imeiMagic = array_merge($imei_b,$imei_a); for ($i = 0; $i < 12; $i++) { $nck[$i] = $xsum[$i] + $imeiMagic[$i] + $magicNums[$i]; if (strlen($nck[$i]) > 1) { $nck[$i] = substr($nck[$i], -1); } } return implode($nck); } echo zteX760("359202046278908"); ?> |
Bookmarks |
| |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Seeking for flash nokia 5110 old version (3 version) can exchange for new | Tomas | Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) | 8 | 10-14-2017 19:29 |
Need software upgrade for Nokia 5110 | ptkrf | Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) | 30 | 02-24-2016 10:21 |
How can I do a Welcome note for my 6110 a dosn't have any one ? | Viper | Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) | 8 | 06-27-2015 11:57 |
needed pinout for carkit(N61xx) | mobileinfo | Nokia Hardware & Hardware Repair | 2 | 07-23-2013 02:41 |
Operator-Logo for 5110 | MiMiR the WiseMan | Nokia Legacy Phones ( DCT-1 ,2 ,3 ,L ) | 2 | 06-25-1999 15:50 |
|