Idea Net Setter

gagan007

Uhu, Not Gonna Happen!
Pratul_09...I'd be thankful to you if you could share the source code with me. I am not electronics student or need to unlock any modem but just out of curiosity..as I am a programmer myself..

I will send you a PM with my email ID once you confirm...
 
OP
rahul_c

rahul_c

Journeyman
MD5 is encryption algo, go check in wikipedia
and hash is the secret code for huawei
No you can accept CDMA network on your Huawei E1550

if you want source code i have it in VB, i can provide it to you on request.

I have not learned programming yet so code is useless for me, if you can make a self executable software with code and upload it that would be a great help.

Too bad I cant run CDMA :sad:
 

Pratul_09

Journeyman
I have not learned programming yet so code is useless for me, if you can make a self executable software with code and upload it that would be a great help.

Too bad I cant run CDMA :sad:

I can just guide you in building one unlocker for yourself. I will not be charging you anything so its up to you to build the exe yourself in any language you are comfortable

for huawei GSM / 3G modems you can start the VB6 IDE and start a new program

Then add three textboxes (Text3, Text2, Text3)
add three labels (Label1, Label2, Label3)
add two command buttons (Command1, Command2)

Now
rename label1 caption as 'IMEI',
label2 caption as 'unlock code',
label3 caption as 'flash code',
command1 caption as 'calculate'
& command2 caption as 'close'

Now goto code view and add the code
Code:
Private gBytes() As Byte
Private gHash    As New MD5Hash

Private Function CheckHex(gHex As String) As String

    ' This function will append a '0' if Hex Value is single digit.
    If Len(gHex) = 1 Then
        gHex = "0" & gHex
    End If

    CheckHex = gHex
End Function

Private Sub Command1_Click()
    Dim gIMEI       As String
    Dim gHexVal1(3) As String
    Dim gHexVal2(3) As String
    Dim gHexVal3(3) As String
    Dim gHexVal4(3) As String
    Dim X           As Integer
    Dim gHashStr    As String
    Dim gXoredHash  As Long

    gIMEI = Text1.Text

    If IsNumeric(gIMEI) = False Or Len(gIMEI) < 15 Then
        MsgBox "Entered IMEI is invalid!", vbExclamation, "Error"
        Exit Sub
    End If

    gIMEI = gIMEI & "5e8dd316726b0335" 'Append Unlock Hash with IMEI
    gBytes = StrConv(gIMEI, vbFromUnicode)
    gHashStr = gHash.HashBytes(gBytes) 'Creating MD5 Hash

    'MsgBox gHashStr
    For X = 0 To 3
        gHexVal1(0) = Mid(gHashStr, 1, 2)
        gHexVal1(1) = Mid(gHashStr, 9, 2)
        gHexVal1(2) = Mid(gHashStr, 17, 2)
        gHexVal1(3) = Mid(gHashStr, 25, 2)
        gHexVal2(0) = Mid(gHashStr, 3, 2)
        gHexVal2(1) = Mid(gHashStr, 11, 2)
        gHexVal2(2) = Mid(gHashStr, 19, 2)
        gHexVal2(3) = Mid(gHashStr, 27, 2)
        gHexVal3(0) = Mid(gHashStr, 5, 2)
        gHexVal3(1) = Mid(gHashStr, 13, 2)
        gHexVal3(2) = Mid(gHashStr, 21, 2)
        gHexVal3(3) = Mid(gHashStr, 29, 2)
        gHexVal4(0) = Mid(gHashStr, 7, 2)
        gHexVal4(1) = Mid(gHashStr, 15, 2)
        gHexVal4(2) = Mid(gHashStr, 23, 2)
        gHexVal4(3) = Mid(gHashStr, 31, 2)
    Next X

    gHexVal1(0) = Hex(Val("&H" & gHexVal1(0)) Xor Val("&H" & gHexVal1(1)) Xor Val("&H" & gHexVal1(2)) Xor Val("&H" & gHexVal1(3)))
    gHexVal1(1) = Hex(Val("&H" & gHexVal2(0)) Xor Val("&H" & gHexVal2(1)) Xor Val("&H" & gHexVal2(2)) Xor Val("&H" & gHexVal2(3)))
    gHexVal1(2) = Hex(Val("&H" & gHexVal3(0)) Xor Val("&H" & gHexVal3(1)) Xor Val("&H" & gHexVal3(2)) Xor Val("&H" & gHexVal3(3)))
    gHexVal1(3) = Hex(Val("&H" & gHexVal4(0)) Xor Val("&H" & gHexVal4(1)) Xor Val("&H" & gHexVal4(2)) Xor Val("&H" & gHexVal4(3)))

    For X = 0 To 3
        gHexVal1(X) = CheckHex(gHexVal1(X))
    Next X

    gXoredHash = Val("&H" & gHexVal1(0) & gHexVal1(1) & gHexVal1(2) & gHexVal1(3))
    Text2.Text = gXoredHash And &H1FFFFFF Or &H2000000

    'now turn for Flash code calculation.
    gIMEI = Text1.Text

    gIMEI = gIMEI & "97b7bc6be525ab44" 'Append Flash Code Hash with IMEI
    gBytes = StrConv(gIMEI, vbFromUnicode)
    gHashStr = gHash.HashBytes(gBytes) 'Creating MD5 Hash

    'MsgBox gHashStr
    For X = 0 To 3
        gHexVal1(0) = Mid(gHashStr, 1, 2)
        gHexVal1(1) = Mid(gHashStr, 9, 2)
        gHexVal1(2) = Mid(gHashStr, 17, 2)
        gHexVal1(3) = Mid(gHashStr, 25, 2)
        gHexVal2(0) = Mid(gHashStr, 3, 2)
        gHexVal2(1) = Mid(gHashStr, 11, 2)
        gHexVal2(2) = Mid(gHashStr, 19, 2)
        gHexVal2(3) = Mid(gHashStr, 27, 2)
        gHexVal3(0) = Mid(gHashStr, 5, 2)
        gHexVal3(1) = Mid(gHashStr, 13, 2)
        gHexVal3(2) = Mid(gHashStr, 21, 2)
        gHexVal3(3) = Mid(gHashStr, 29, 2)
        gHexVal4(0) = Mid(gHashStr, 7, 2)
        gHexVal4(1) = Mid(gHashStr, 15, 2)
        gHexVal4(2) = Mid(gHashStr, 23, 2)
        gHexVal4(3) = Mid(gHashStr, 31, 2)
    Next X

    gHexVal1(0) = Hex(Val("&H" & gHexVal1(0)) Xor Val("&H" & gHexVal1(1)) Xor Val("&H" & gHexVal1(2)) Xor Val("&H" & gHexVal1(3)))
    gHexVal1(1) = Hex(Val("&H" & gHexVal2(0)) Xor Val("&H" & gHexVal2(1)) Xor Val("&H" & gHexVal2(2)) Xor Val("&H" & gHexVal2(3)))
    gHexVal1(2) = Hex(Val("&H" & gHexVal3(0)) Xor Val("&H" & gHexVal3(1)) Xor Val("&H" & gHexVal3(2)) Xor Val("&H" & gHexVal3(3)))
    gHexVal1(3) = Hex(Val("&H" & gHexVal4(0)) Xor Val("&H" & gHexVal4(1)) Xor Val("&H" & gHexVal4(2)) Xor Val("&H" & gHexVal4(3)))

    For X = 0 To 3
        gHexVal1(X) = CheckHex(gHexVal1(X))
    Next X

    gXoredHash = Val("&H" & gHexVal1(0) & gHexVal1(1) & gHexVal1(2) & gHexVal1(3))
    Text3.Text = gXoredHash And &H1FFFFFF Or &H2000000

End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Add a new class module to the project with name 'MD5hash'
and add code
Code:
Option Explicit

'MD5Hash
'Perform CryptoAPI MD5 hash of contents of a named file or a Byte array, returning hash as String of 32 hex digits.
'----- Private Consts -----

Private Const ALG_TYPE_ANY        As Long = 0
Private Const ALG_CLASS_HASH      As Long = 32768
Private Const ALG_SID_MD5         As Long = 3
Private Const CALG_MD5            As Long = ALG_CLASS_HASH Or ALG_TYPE_ANY Or ALG_SID_MD5

Private Const PROV_RSA_FULL       As Long = 1
Private Const CRYPT_VERIFYCONTEXT As Long = &HF0000000
Private Const MS_DEFAULT_PROVIDER As String = "Microsoft Base Cryptographic Provider v1.0"

Private Const HP_HASHVAL          As Long = 2
Private Const HP_HASHSIZE         As Long = 4
                  
'----- Private Defines -----
Private Declare Function CryptAcquireContext _
                Lib "advapi32" _
                Alias "CryptAcquireContextA" (ByRef phProv As Long, _
                                              ByVal pszContainer As String, _
                                              ByVal pszProvider As String, _
                                              ByVal dwProvType As Long, _
                                              ByVal dwFlags As Long) As Long 'TRUE (<> 0) = success.  See Err.LastDLLError if FALSE.

Private Declare Function CryptCreateHash _
                Lib "advapi32" (ByVal hProv As Long, _
                                ByVal algid As Long, _
                                ByVal hKey As Long, _
                                ByVal dwFlags As Long, _
                                ByRef phHash As Long) As Long 'TRUE (<> 0) = success.  See Err.LastDLLError if FALSE.
    
Private Declare Function CryptDestroyHash _
                Lib "advapi32" (ByVal hHash As Long) As Long 'TRUE (<> 0) = success.  See Err.LastDLLError if FALSE.

Private Declare Function CryptGetHashParam _
                Lib "advapi32" (ByVal hHash As Long, _
                                ByVal dwParam As Long, _
                                ByRef pbData As Any, _
                                ByRef pdwDataLen As Long, _
                                ByVal dwFlags As Long) As Long

Private Declare Function CryptHashData _
                Lib "advapi32" (ByVal hHash As Long, _
                                ByRef pbData As Any, _
                                ByVal dwDataLen As Long, _
                                ByVal dwFlags As Long) As Long

Private Declare Function CryptReleaseContext _
                Lib "advapi32" (ByVal hProv As Long, _
                                ByVal dwFlags As Long) As Long 'TRUE (<> 0) = success.  See Err.LastDLLError if FALSE.

'----- Private Data -----
Private m_hHash     As Long 'Hash object handle.
Private m_hProvider As Long 'Cryptographic Service Provider handle.

'----- Private Methods -----
Private Sub HashBlock(ByRef Block() As Byte)

    If CryptHashData(m_hHash, Block(LBound(Block)), UBound(Block) - LBound(Block) + 1, 0&) = 0 Then
        Err.Raise vbObjectError Or &HC312&, "MD5Hash", "Failed to hash data block, system error " & CStr(Err.LastDllError)
    End If

End Sub

Private Function HashValue() As String
    Dim lngDataLen     As Long
    Dim lngHashSize    As Long
    Dim bytHashValue() As Byte
    
    lngDataLen = 4 '4 bytes for Long length.

    If CryptGetHashParam(m_hHash, HP_HASHSIZE, lngHashSize, lngDataLen, 0&) = 0 Then
        Err.Raise vbObjectError Or &HC322&, "MD5Hash", "Failed to obtain hash value length, system error " & CStr(Err.LastDllError)
    Else
        lngDataLen = lngHashSize
        ReDim bytHashValue(lngDataLen - 1)
        
        If CryptGetHashParam(m_hHash, HP_HASHVAL, bytHashValue(0), lngDataLen, 0&) = 0 Then
            Err.Raise vbObjectError Or &HC324&, "MD5Hash", "Failed to obtain hash value, system error " & CStr(Err.LastDllError)
        Else
            Dim intByte As Integer
            
            For intByte = 0 To lngDataLen - 1
                HashValue = HashValue & Right$("0" & Hex$(bytHashValue(intByte)), 2)
            Next
            
            CryptDestroyHash m_hHash
        End If
    End If

End Function

Private Sub NewHash()

    If CryptCreateHash(m_hProvider, CALG_MD5, 0&, 0&, m_hHash) = 0 Then
        Err.Raise vbObjectError Or &HC332&, "MD5Hash", "Failed to create CryptoAPI Hash object, system error " & CStr(Err.LastDllError)
    End If

End Sub

'----- Public Methods -----
Public Function HashFile(ByVal FileName As String) As String
    Const CHUNK        As Long = 16384
    Dim intFile        As Integer
    Dim lngWholeChunks As Long
    Dim intRemainder   As Integer
    Dim lngChunk       As Long
    Dim bytBlock()     As Byte
    
    On Error Resume Next 'Does file exist?
    GetAttr FileName

    If Err.Number = 0 Then
        On Error GoTo 0
        intFile = FreeFile(0)
        Open FileName For Binary Access Read As #intFile
        lngWholeChunks = LOF(intFile) \ CHUNK
        intRemainder = LOF(intFile) - (CHUNK * lngWholeChunks)
        NewHash
        ReDim bytBlock(CHUNK - 1)

        For lngChunk = 1 To lngWholeChunks
            Get #intFile, , bytBlock
            HashBlock bytBlock
        Next

        If intRemainder > 0 Then
            ReDim bytBlock(intRemainder - 1)
            Get #intFile, , bytBlock
            HashBlock bytBlock
        End If

        Close #intFile
        HashFile = HashValue()
    Else
        Err.Raise vbObjectError Or &HC342&, "MD5Hash.HashFile", "File doesn't exist"
    End If

End Function

Public Function HashBytes(ByRef Block() As Byte) As String
    NewHash
    HashBlock Block
    HashBytes = HashValue()
End Function

'----- Class Event Handlers -----
Private Sub Class_Initialize()

    If CryptAcquireContext(m_hProvider, vbNullString, MS_DEFAULT_PROVIDER, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT) = 0 Then
        Err.Raise vbObjectError Or &HC352&, "MD5Hash.Class_Initialize", "Failed to obtain access to CryptoAPI, system error " & CStr(Err.LastDllError)
    End If

End Sub

Private Sub Class_Terminate()
    On Error Resume Next 'All exceptions must be processed here.
    CryptDestroyHash m_hHash
    CryptReleaseContext m_hProvider, 0&
End Sub

Then save the project and generate the exe using compiling or run directly.
Enter your IMEI in text1 and press calculate to get your unlock codes

sir will u plz teach me how to unlock mmx 310g bsnl 3g modem..

Check your modem is it huawei or zte and then try
 
Last edited:
OP
rahul_c

rahul_c

Journeyman
Hi dude i can unlock
idea netsetter and also BSNL 3g modem so they will work with any sim

Have you unlocked my DATA Card? Now I can access the network settings.

What is WCDMA is it different from CDMA? BSNL 3G is shown under WCDMA mode only. Reliance has CDMA network why cant I use it through Data Card?
 
Last edited:

arghya

Broken In
@Pratul_09
SIR THE MODEM IS NEITHER ZTE NOR HUAWEI IT IS MICROMAX MMX 310G 3G MODEM
CAN U PROVIDE ME A UNLOCKER SOFTWARE OR FORMULA TO UNLOCK THIS MODEMS....
 

Pratul_09

Journeyman
@Pratul_09
SIR THE MODEM IS NEITHER ZTE NOR HUAWEI IT IS MICROMAX MMX 310G 3G MODEM
CAN U PROVIDE ME A UNLOCKER SOFTWARE OR FORMULA TO UNLOCK THIS MODEMS....

Micromax does not manufacture any modems, it just rebrands them as micromax.

You can search for dc-ulocker software on net. Install the client software. Plug in your modem and then start the dc-unlocker.
You can select the manufacturer and model or either click on detect card button. Then wait while it tries to detect the datacard.

Then post the log here so that i can guide you further.

Have you unlocked my DATA Card? Now I can access the network settings.

What is WCDMA is it different from CDMA? BSNL 3G is shown under WCDMA mode only. Reliance has CDMA network why cant I use it through Data Card?

WCDMA is Wideband CDMA its a 3.5G Technology.
BSNL is using GSM and therefore its common to see UMTS(3G) --> WCDMA(3.5G).
Reliance(Netconnect) is using EV-DO therefore CDMA(2G/3G) --> WCDMA(3.5G). If your area has Reliance 3G then you may also see Reliance UMTS or WCDMA signal.
 
Last edited:

arghya

Broken In
SIR LATEST DC UNLOCKER DOESENT SUPPORTS THIS MODEL OF MICROMAX..
I TRIED IT BUT ID COULDNT DETECT,
FULL INFORMATION OF MODEM IS

Modem Information
Modem name: MMX310G 3G USB Manager
At port: COM 6
Firmware version: LQA0094.1.1_MG32
IMEI: 910532500884482
IMSI: 405672306379149
------------------------------------------------------------------------------
Operator Information
PIN code status: READY
Network code: 40567
Network selection mode: Auto
Network mode: GSM
Signal strength: 55
------------------------------------------------------------------------------
Network Status
CS network registration: Registered,Home PLMN
PS network registration: Registered,Home PLMN
PS network attachment: Attached

SOME EXPERTS ARE PROVIDING NCK CODE AGAINST IMEI NO FOR THIS MODEL BUT NOT THE GENERATOR,
BUT I NEED THAT SOFTWARE SIR...
KINDLY HELP ME
 

Pratul_09

Journeyman
SIR LATEST DC UNLOCKER DOESENT SUPPORTS THIS MODEL OF MICROMAX..
I TRIED IT BUT ID COULDNT DETECT,
FULL INFORMATION OF MODEM IS

Modem Information
Modem name: MMX310G 3G USB Manager
At port: COM 6
Firmware version: LQA0094.1.1_MG32
IMEI: 910532500884482
IMSI: 405672306379149
------------------------------------------------------------------------------
Operator Information
PIN code status: READY
Network code: 40567
Network selection mode: Auto
Network mode: GSM
Signal strength: 55
------------------------------------------------------------------------------
Network Status
CS network registration: Registered,Home PLMN
PS network registration: Registered,Home PLMN
PS network attachment: Attached

SOME EXPERTS ARE PROVIDING NCK CODE AGAINST IMEI NO FOR THIS MODEL BUT NOT THE GENERATOR,
BUT I NEED THAT SOFTWARE SIR...
KINDLY HELP ME

Did u select the model manually or used Detect card option
 

arghya

Broken In
i have checked both sir, none worked..
i have also checked their websites also,
it only supports micromax mmx 610g


see here
Dc-unlocker | list supported models producers features Huawei, ZTE
 
Last edited:

Pratul_09

Journeyman
SIR LATEST DC UNLOCKER DOESENT SUPPORTS THIS MODEL OF MICROMAX..
I TRIED IT BUT ID COULDNT DETECT,
FULL INFORMATION OF MODEM IS

Modem Information
Modem name: MMX310G 3G USB Manager
At port: COM 6
Firmware version: LQA0094.1.1_MG32
IMEI: 910532500884482
IMSI: 405672306379149
------------------------------------------------------------------------------
Operator Information
PIN code status: READY
Network code: 40567
Network selection mode: Auto
Network mode: GSM
Signal strength: 55
------------------------------------------------------------------------------
Network Status
CS network registration: Registered,Home PLMN
PS network registration: Registered,Home PLMN
PS network attachment: Attached

SOME EXPERTS ARE PROVIDING NCK CODE AGAINST IMEI NO FOR THIS MODEL BUT NOT THE GENERATOR,
BUT I NEED THAT SOFTWARE SIR...
KINDLY HELP ME


I have attached the huawei Unlock code calculator, change the extension from pdf to exe and use it to calculate your unlock and flash code ie., nck code.
 

arghya

Broken In
sir the calculater gives 8 digit code, bt 10 digit code is required to unlock micromax mmx 310g modems, so it doesent works,its for huawei
plz upload for micromax...

u can check dt some are giving codes of micromax bt not d calculater in the link

HERE MMX 310G Unlocking NCK Code to Unlock - Cdma Gsm Forum Mygsmindia.

sir plz try to get calculator for micromax.

plz reply sir
 
Last edited:

Pratul_09

Journeyman
hey arghya why don't you try in the same forum they may be more helpful.
Or you can try a different approach which is long,

you can look out here
*unlock.dp.ua/forum/viewtopic.php?f=9&t=19
 
Last edited:

arghya

Broken In
sir in dt forum they provide only nck code against imei, not the calculator, bt i need d calculator....
the link given by u is again for huawei.
i need for micromax.. plz try.
 

Pratul_09

Journeyman
sir in dt forum they provide only nck code against imei, not the calculator, bt i need d calculator....
the link given by u is again for huawei.
i need for micromax.. plz try.

are u a unlock dealer. if u have one modem its well & fine to get nck. why u require the
calculator.
 

arghya

Broken In
actually m in a forum, where i need to provide nck code to atleast 2 peoples daily, my modem is already unlocked..
dtsy i need d calculator.
so i requested ur help...
 
OP
rahul_c

rahul_c

Journeyman
put any sim card of another company other than the provided, if it works, dn its unlocked. if it says invalid sim or ask for code, dn its locked...
When I insert the SIM it locks my SIM,are the manual network settings available by default?
 
Top Bottom