Showing posts with label Huawei. Show all posts
Showing posts with label Huawei. Show all posts

Thursday, September 18, 2014

BM622i 2011 Telnet Enabler (90kb ONLY)

FOR EDUCATIONAL PURPOSES ONLY haha!



For security reasons Huawei disabled telnet service access to their BM622i 2011 model.

Some users want to access its telnet service out of curiousity(???) not sure.. who knows lol. Currently the only way to open it is to use their own Upgrader app to trick the modem that you really are going to upgrade its firmware which obviously needs telnet access :D

This app does the same the only difference is it doesn't have the actual firmware in it which makes this app so small. It just emulates what the Upgrader does when you open it.

Download

Saturday, September 7, 2013

OLD Huawei Unlock/Flash Code Calculator for VB.NET and MONO


I found this unlock/flash algo for Huawei a year ago I'm not just quite sure for what model(s). This was orgininally written in C(I think?) I forgot where did I get it but still full credit goes to him. I ported this to VB.NET but will also work on MONO in Linux. Just in case you're not familiar with MONO, it's a cross-platform software that can compile and run .NET applications in Android, most Linux distributions, BSD, OS X and Solaris. Recently a few hackers cracked the new algo for Huawei's latest modems unfortunately I'm not one of those lol. Anyway I'll just share the old one for educational purposes :D.
Class HelloWorld 
    Shared Sub Main
        Dim sMD5 As String
        Dim sBit(15) As Integer
        Dim X, y As Short
        Dim sT, sF, sS, sFt As Integer
        Dim sKey As String
        Dim temp As Integer

        Dim s_Unlock As String
        Dim s_Flash As String
        Dim s_IMEI As String

Top:
        System.Console.WriteLine("Credits to the original author of the algo" & vbCrLf & "Enter your 15 Digit IMEI Code: ")
        System.Console.SetCursorPosition(31, 0)
        s_IMEI = System.Console.ReadLine

        If s_IMEI.Length <> 15 Then
            System.Console.WriteLine("Invalid IMEI...")
            GoTo Top
        End If

        sMD5 = getMD5Hash(s_IMEI & "5e8dd316726b0335")
        y = 1
        For X = 0 To 15
            Dim bit As String = Mid(sMD5, y, 2)
            sBit(X) = Int32.Parse(bit, Globalization.NumberStyles.HexNumber)
            y = y + 2
        Next

        sF = sBit(0) Xor sBit(4) Xor sBit(8) Xor sBit(12)
        sS = sBit(1) Xor sBit(5) Xor sBit(9) Xor sBit(13)
        sT = sBit(2) Xor sBit(6) Xor sBit(10) Xor sBit(14)
        sFt = sBit(3) Xor sBit(7) Xor sBit(11) Xor sBit(15)

        sKey = sF.ToString("x2") & sS.ToString("x2") & sT.ToString("x2") & sFt.ToString("x2")
        temp = Int32.Parse(sKey, Globalization.NumberStyles.HexNumber) And 33554431 Or 33554432
        s_Unlock = CStr(temp)
        '----------------------------------
        sMD5 = getMD5Hash(s_IMEI & "97b7bc6be525ab44")
        y = 1
        For X = 0 To 15
            Dim bit As String = Mid(sMD5, y, 2)
            sBit(X) = Int32.Parse(bit, Globalization.NumberStyles.HexNumber)
            y = y + 2
        Next

        sF = sBit(0) Xor sBit(4) Xor sBit(8) Xor sBit(12)
        sS = sBit(1) Xor sBit(5) Xor sBit(9) Xor sBit(13)
        sT = sBit(2) Xor sBit(6) Xor sBit(10) Xor sBit(14)
        sFt = sBit(3) Xor sBit(7) Xor sBit(11) Xor sBit(15)

        sKey = sF.ToString("x2") & sS.ToString("x2") & sT.ToString("x2") & sFt.ToString("x2")
        temp = Int32.Parse(sKey, Globalization.NumberStyles.HexNumber) And 33554431 Or 33554432
        s_Flash = CStr(temp)

        System.Console.WriteLine("Unlock Code: {0}", s_Unlock)
        System.Console.WriteLine("Flash Code: {0}", s_Flash)
        System.Console.ReadKey()
        System.Console.Clear()
        GoTo Top
    End Sub 
    
    Shared Function getMD5Hash(ByVal strToHash As String) As String
        Dim md5Obj As New System.Security.Cryptography.MD5CryptoServiceProvider
        Dim bytesToHash() As Byte = System.Text.Encoding.ASCII.GetBytes(strToHash)

        bytesToHash = md5Obj.ComputeHash(bytesToHash)

        Dim strResult As String = ""

        For Each b As Byte In bytesToHash
            strResult += b.ToString("x2")
        Next

        Return strResult
    End Function
End Class

You can also try it online via Programr.com

 

Copyright 2017 Code Monkey