Register FAQ Members List ★. iPhone Unlock .★ Calendar ★. Gift Card .★ Search Today's Posts Mark Forums Read

 GSM Programming & Reverse Engineering Here you can post all Kind of GSM Programming and Reverse Engineering tools and Secrets.

Need forum moderator for managing this forum. Apply Here 01-19-2014, 20:33   #1 (permalink)  Join Date: May 2013
Posts: 262
Status: Offline
Thanks: 625
Thanked 68 Times in 39 Posts
ALGO for zte unlock Here

hi to all :
algo for zte unlocking here :

PHP Code:
``` import hashlib, getopt, sysmagic = [6, 8, 8, 9, 5, 0, 0, 0, 0, 0, 0, 0]def usage():    print "Options: -i*, --imei=*      IMEI of the device"    print ""    print "Example: zte-unlock.txt --imei=351234567891239"    print ""def testIMEIChecksum(digits):    _sum = 0    alt = False    for d in reversed(digits):        assert 0 <= d <= 9        if alt:            d *= 2        if d > 9:            d -= 9        _sum += d        alt = not alt    return (_sum % 10) == 0def checkIMEI(imei):    digits = []    if len(imei) != 15:        print "IMEI too short/long"        return False    for i in imei:        digits.append(int(i))    if not testIMEIChecksum(digits):        print "IMEI checksum invalid"        return False    return Truedef getCode(imei):    digits = []    nck = ""    spck = ""    crosssum = 0    for i in imei[3:15]:        digits.append(int(i))    for i in digits:        crosssum += i    for i in range(0,len(digits)):        code = (digits[i]*crosssum + digits[11-i]*8 + magic[i]) % 10        nck += "%d" % code        spck += "%d" % ((code + digits[11-i]) % 10)    return (nck, spck)def main():    info()        try:                   opts, args = getopt.getopt(sys.argv[1:], "hi:", ["help", "imei="])        except getopt.GetoptError, err:                print str(err) # will print something like "option -a not recognized"                usage()                sys.exit(2)    imei = ""    interactive = False        for o, a in opts:                if o in ("-i", "--imei"):                        imei = a                elif o in ("-h", "--help"):                        usage()                        sys.exit()    if imei == "":        imei = raw_input("Please enter the IMEI of the device:  ")        interactive = True    if checkIMEI(imei):        nck, spck = getCode(imei)        print ""        print "Network Control Key (NCK):            " + nck        print "Service Provider Control Key (SPCK):  " + spck        print "done."    if interactive:        raw_input()    if __name__ == "__main__":    main()  ```  01-19-2014, 20:33 #2 (permalink) Administrator  Join Date: May 2013 Posts: 262 Status: Offline Thanks: 625 Thanked 68 Times in 39 Posts here my code in c# (badly coded) u can optimize it by using functions !! PHP Code: ``` bool a = false;             //ZTE             //-----------------             if (comboBox2.SelectedIndex == 0)             {                 string imei = ""; char d = 'n'; int s1 = 0; int s2 = 0; int s3 = 0; int s = 0;                 string imei1 = ""; string stp1 = ""; string stp11 = ""; string stp2 = ""; string imei2 = "";                 string stp22 = ""; string stp222 = ""; string stp3 = ""; string NCK = ""; string SPCK = ""; string sp = "";                 string ml = "688950000000";                  imei = textBox1.Text;                 if (imei != "" & imei.Length == 15)                 {                     for (int i = 0; i < 15; i++)                     {                         d = imei[i];                         if (Char.IsDigit(d))                         {                             if (i > 2)                             {                                 s1 = s1 + (int)(Char.GetNumericValue(d));                                 imei1 = imei1 + d;                             }                         }                         else                         {                             MessageBox.Show(" Enter a valid imei");                             richTextBox1.Text = "Enter a valid imei";                             a = true; break;                         }                     }                     if (a == false)                     {                         //1st & 2nd steps                         for (int i = 0; i < 12; i++)                         {                             d = imei1[i];                             s2 = s1 * ((int)(Char.GetNumericValue(d)));                             s3 = 8 * ((int)(Char.GetNumericValue(d)));                             stp11 = s2.ToString(); stp22 = s3.ToString();                             stp1 = stp1 + stp11[(stp11.Length - 1)];                             stp222 = stp222 + stp22[(stp22.Length - 1)];                          }                         for (int i = 0; i < 12; i++)                         {                             stp2 = stp2 + stp222[(11 - i)];                         }                         //3rd step                         for (int i = 0; i < 12; i++)                         {                             s = (int)(char.GetNumericValue(stp1[i]) + Char.GetNumericValue(stp2[i])                                 + Char.GetNumericValue(ml[i]));                             stp3 = s.ToString();                             NCK = NCK + stp3[stp3.Length - 1];                         }                         //spck                         for (int i = 0; i < 12; i++)                         {                             imei2 = imei2 + imei1[(11 - i)];                             s1 = (int)(Char.GetNumericValue(imei2[i]) + Char.GetNumericValue(NCK[i]));                             sp = s1.ToString();                             SPCK = SPCK + sp[sp.Length - 1];                         }                         richTextBox1.Clear();                         richTextBox1.SelectionColor = Color.PowderBlue;                         richTextBox1.SelectedText = "ZTE NCK Calculator by ..::AnGeL25dZ::.."                             +'\n'+"******************"                             +'\n'+"imei: " + imei                              + '\n' + "NCK:  " + NCK                             + '\n' + "SPCK: " + SPCK                             + '\n' + "******************"                             +'\n'+"./ Done :-)";                                              }                  }                 else                 {                     MessageBox.Show(" Enter a valid imei");                     richTextBox1.Text = "Enter a valid imei";                 }  ``` Thread Tools Search this Thread Show Printable Version Email this Page Search this Thread: Advanced Search Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode

All times are GMT +1. The time now is 21:18. 