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
Nice blog
ReplyDelete