How to make mig33 login function [Part 6]
Hello guys,
could you remember the previous tutorial ?
There was a Mig33 login packet. Right ?
02 00 C8 00 01 00 00 00 7E 00 13 00 00 00 01 00 …….. ~…….
00 10 00 00 00 04 00 00 00 15 00 0F 00 00 00 05 …….. ……..
65 6E 2D 55 53 00 0D 00 00 00 04 00 00 00 A9 00 en-US… ……..
0C 00 00 00 04 00 00 00 AA 00 0B 00 00 00 04 00 …….. ……..
00 00 0E 00 09 00 00 00 01 01 00 08 00 00 00 04 …….. ……..
6A 32 6D 65 00 07 00 00 00 0D 4A 32 4D 45 76 34 j2me…. ..J2MEv4
2E 32 30 2E 32 39 31 00 05 00 00 00 03 62 65 31 .20.291. …..be1
00 03 00 00 00 02 01 A4 00 02 00 00 00 01 02 00 …….. ……..
01 00 00 00 02 00 01 …….
Look at the packet carefully 00 00 00 7E This is the Total lenght of Packet. It’s in Hex format. Let’s try to make it Demical format. Any question ? Obviously you should have a Question I will let you know the Reason of This Conversion
There are many Online Hex to Demical site.
Hex to decimal Online converter
Open a New browser Tab for The above Link. OK, now we will try to convert 00 00 00 7E to Demical. There is no value of 00 so you may through it. Now try to convert 7E to Demical.
It’s 126 right ? Have you any confusion ? Then count yourself .
02 00 C8 00 01 00 00 00 7E 00 13 00 00 00 01 00 …….. ~…….
00 10 00 00 00 04 00 00 00 15 00 0F 00 00 00 05 …….. ……..
65 6E 2D 55 53 00 0D 00 00 00 04 00 00 00 A9 00 en-US… ……..
0C 00 00 00 04 00 00 00 AA 00 0B 00 00 00 04 00 …….. ……..
00 00 0E 00 09 00 00 00 01 01 00 08 00 00 00 04 …….. ……..
6A 32 6D 65 00 07 00 00 00 0D 4A 32 4D 45 76 34 j2me…. ..J2MEv4
2E 32 30 2E 32 39 31 00 05 00 00 00 03 62 65 31 .20.291. …..be1
00 03 00 00 00 02 01 A4 00 02 00 00 00 01 02 00 …….. ……..
01 00 00 00 02 00 01 …….
Can you tell me which is the variable of the above packet ? which is the constant of this packet ?
There are 2 variables 1. Total Packet length and 2. Username rest of all is Constant. In order to know those variables we should convert hex value to demical. We have got that the total length of packet is 126 so this is variable and be1 (username) is another variable. So which is the constant length variable ?
123 right ? Because length(be1)+123 = 126 Right ? That is why 123 is packet length constant for this packet.
02 00 C8 00 01 00 00 00 ” & DecToHexStr(Len(username) + 123)
is it OK ?
Now Just put the constant packet ” 00 13 00 00 00 01 00 00 10 00 00 00 04 00 00 00 15 00 0F 00 00 00 05 65 6E 2D 55 53 00 0D 00 00 00 04 00 00 00 A9 00 0C 00 00 00 04 00 00 00 AA 00 0B 00 00 00 04 00 00 00 0E 00 09 00 00 00 01 01 00 08 00 00 00 04 6A 32 6D 65 00 07 00 00 00 0D 4A 32 4D 45 76 34 2E 32 30 2E 32 38 36 00 05 00 00 00 ”
I have told that every Mig33 packet contains Packet length. So you have to put Username length as like before.
00 00 00 03 62 65 31
Blue color = length packet
Green color = Hex of Username
DecToHexStr(Len(username)) & ” ” & Asciitohex(username)
And the rest constant packet ” 00 03 00 00 00 02 01 A4 00 02 00 00 00 01 02 00 01 00 00 00 02 00 01″ .
You may ask
why should I use Dectohexstr Function ?
why should I use AsciitoHex Function ?
why should I use HextoAscii Function ?
You may use Dectohexstr function in order to avoid 00 byte.
You should use AsciitoHex Function in order to avoid Unicode conversion error.
You should use HextoAscii Function Because Mig33 server only accept only Ascii format data
So we may get total function as
“02 00 C8 00 01 00 00 00 ” & DecToHexStr(Len(Username) + 123) & ” 00 13 00 00 00 01 00 00 10 00 00 00 04 00 00 00 15 00 0F 00 00 00 05 65 6E 2D 55 53 00 0D 00 00 00 04 00 00 00 A9 00 0C 00 00 00 04 00 00 00 AA 00 0B 00 00 00 04 00 00 00 0E 00 09 00 00 00 01 01 00 08 00 00 00 04 6A 32 6D 65 00 07 00 00 00 0D 4A 32 4D 45 76 34 2E 32 30 2E 32 38 36 00 05 00 00 00 ” & DecToHexStr(Len(Username)) & ” ” & Asciitohex(Username) & ” 00 03 00 00 00 02 01 A4 00 02 00 00 00 01 02 00 01 00 00 00 02 00 01″
This is the Hex format of your Packet. Now convert it to Ascii format.
HextoAscii(“02 00 C8 00 01 00 00 00 ” & DecToHexStr(Len(Username) + 123) & ” 00 13 00 00 00 01 00 00 10 00 00 00 04 00 00 00 15 00 0F 00 00 00 05 65 6E 2D 55 53 00 0D 00 00 00 04 00 00 00 A9 00 0C 00 00 00 04 00 00 00 AA 00 0B 00 00 00 04 00 00 00 0E 00 09 00 00 00 01 01 00 08 00 00 00 04 6A 32 6D 65 00 07 00 00 00 0D 4A 32 4D 45 76 34 2E 32 30 2E 32 38 36 00 05 00 00 00 ” & DecToHexStr(Len(Username)) & ” ” & Asciitohex(Username) & ” 00 03 00 00 00 02 01 A4 00 02 00 00 00 01 02 00 01 00 00 00 02 00 01″)
ok ?
Any Question ?
YOUR HOME WORK
02 00 C8 00 02 00 00 00 82 00 13 00 00 00 01 00 …….. ……..
00 10 00 00 00 04 00 00 00 15 00 0F 00 00 00 05 …….. ……..
65 6E 2D 55 53 00 0D 00 00 00 04 00 00 00 A9 00 en-US… ……..
0C 00 00 00 04 00 00 00 AA 00 0B 00 00 00 04 00 …….. ……..
00 00 0E 00 09 00 00 00 01 01 00 08 00 00 00 04 …….. ……..
6A 32 6D 65 00 07 00 00 00 0D 4A 32 4D 45 76 34 j2me…. ..J2MEv4
2E 32 30 2E 32 39 31 00 05 00 00 00 07 6B 69 70 .20.291. …..kip
74 61 2D 2D 00 03 00 00 00 02 01 A4 00 02 00 00 ta–…. ……..
00 01 02 00 01 00 00 00 02 00 01 ……… .. …
This is another Login Packet. Now Make your own login Function
Don’t forget to mention your problem Here.
How to make mig33 pc software [Part 1]
How to make mig33 pc software [Part 2]
How to make mig33 pc software [Part 3]
How to make mig33 pc software [Part 4]