mig33 packets function
3 posters
Page 1 of 1
mig33 packets function
This tutorial explains all the main vb6 string functions that allow you to manipulate strings including the Len, Mid, Left, Right, UCase, LCase, Instr, InstrRev, String, Space, Replace, StrReverse, LTrim, RTrim, Trim, Asc, Chr, and the ASCII table. This Visual Basic tutorial should meet all your needs.
Len
Description: Returns a Long containing the length of the specified string
Syntax: Len(string)
Example: lngLen = Len(“At Zone”) ‘ lngLen = 7
Mid
Description: Returns a substring containing a specified number of characters from a string.
Syntax: Mid$(string, start[, length])
Example:
strSubstr = Mid$(“At Zone”, 3, 4) ‘ strSubstr = “Zon”
Mid$ can also be used on the left side of an assignment statement, where you can replace a substring within a string.
strtest = “At Zone”
Mid$(strtest, 3, 1) = “-”
‘strTest now contains “At-Zone”
Left
Description: Returns a substring containing a specified number of characters from the beginning (left side) of a string.
Syntax: Left$(string, length)
Example: strSubstr = Left$(“At-Zone”, 3) ‘ strSubstr = “At-”
‘ Note that the same thing could be accomplished with Mid$:
strSubstr = Mid$(“At-Zone”, 3, 3) ‘ strSubstr = “-Zo”
Right
Description: Returns a substring containing a specified number of characters from the end (right side) of a string.
Syntax: Right$(string, length)
Example: strSubstr = Right$(“At-Zone”, 3) ‘ strSubstr = “one”
‘ Note that the same thing could be accomplished with Mid$:
strSubstr = Mid$(“At-Zone”, 2, 3) ‘ strSubstr = “t-Z”
InStr
Description: Returns a Long specifying the position of one string within another. The search starts either at the first character position or at the position specified by the start argument, and proceeds forward toward the end of the string (stopping when either string2 is found or when the end of the string1 is reached).
Syntax: InStr([start,] string1, string2 [, compare])
Example: lngPos = InStr(“At-Zone”, “Z”)
‘ lngPos = 4
lngPos = InStr(3, “At-Zone”, “o”)
‘ lngPos = 5 (starting at position 6)
lngPos = InStr(“At-Zone”, “Z”)
‘ lngPos = 4 (case-sensitive search)
lngPos = InStr(1, “At-Zone”, “n”, 1)
‘ lngPos = 6 (case-insensitive search)
String
Description: Returns a string containing a repeating character string of the length specified.
Syntax: String$(number, character)
Example:strTest = String$(5, “a”)
‘ strTest = “aaaaa”
strTest = String$(5, 97)
‘ strTest = “aaaaa” (97 is the ASCII code for “a”)
Replace
Description: Returns a string in which a specified substring has been replaced with another substring a specified number of times.
Syntax: Replace$(expression, find, replacewith[, start[, count[, compare]]])
Example:strNewDate = Replace$(“05/05/2011″, “/”, “-”)
‘ strNewDate = “05-05-2011″
Chr
Description: Returns a string containing the character associated with the specified character code.
Syntax: Chr$(charcode)
Example: strChar = Chr$(65) ‘ strChar = “A”
This codes are given by turjo.tnx to him….
MIG33 Packets N Functions
LOGIN PACKET (MIG.V3)
Code:
Public Function SendUname(uname As String)
SendUname = (HextoAscii("02 00 C8 00 02 00 00 00 " & DecToHexStr(Len(uname) + 172) & " 00 16 00 00 00 00 00 15 00 00 00 00 00 14 00 00 00 00 00 13 00 00 00 01 00 00 11 00 00 00 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 1D 6D 69 67 33 33 2F 34 2E 36 32 20 28 55 6E 6B 6E 6F 77 6E 29 20 6B 42 72 6F 77 73 65 72 00 07 00 00 00 0D 4A 32 4D 45 76 34 2E 36 32 2E 30 30 30 00 05 00 00 00 " & DecToHexStr(Len(uname)) & " " & Asciitohex(uname) & " 00 03 00 00 00 02 01 CE 00 02 00 00 00 01 02 00 01 00 00 00 02 00 01"))
End Function
LOGIN PACKET V4.6
Code:
Public Function login(Username As String)
login= HextoAscii(“02 00 C8 00 01 00 00 00 ” & (DecToHexStr(Len(Username) + 73)) & ” 00 09 00 00 00 04 00 00 00 01 00 08 00 00 00 04 6A 32 6D 65 00 07 00 00 00 12 4A 32 4D 45 76 33 2E 30 31 20 4D 49 44 50 2D 31 2E 30 00 05 00 00 00 ” & DecToHexStr(Len(Username)) & ” ” & Asciitohex(Username) & ” 00 03 00 00 00 02 01 2D 00 02 00 00 00 01 01 00 01 00 00 00 02 00 01″)
End Function
LOGIN PACKET (MIG.V4)
Code:
Public Function loginv4(Username As String)
loginv4 = HextoAscii(“02 00 C8 00 03 00 00 00 ” & DecToHexStr(Len(Username) + 123) & ” 00 13 00 00 00 01 01 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 30 35 2E 32 35 39 00 05 00 00 00 ” & DecToHexStr(Len(Username)) & ” ” & Asciitohex(Username) & ” 00 03 00 00 00 02 01 95 00 02 00 00 00 01 02 00 01 00 00 00 02 00 01″)
End Function
HASHCODE CONVERTER & SEND HASHCODE PACKET
Code:
Public Function hashCode(Value)
Dim i As Integer
Const maxInt = 4294967295#
Const maxPostInt = 2147483647Dim h As Currency
Dim div As Longh = 0
For i = 1 To Len(Value)
h = h * 31 + Asc(Mid(Value, i, 1))
If (h > maxInt) Then
div = Int(h / (maxInt + 1))
h = h – (div * (maxInt + 1))
End If
Next i
If h > maxPostInt Then
h = h – maxInt – 1
End If
hashCode = h
End Function
Public Function GenerateHasCode(Packet As String) As String
Dim aLong As Long
Dim TempPacket As String
aLong = hashCode(Packet)
TempPacket = Right(“00000000″ & Hex(aLong),
GenerateHasCode = Left$(TempPacket, 2) & ” ” & Mid$(TempPacket, 3, 2) & ” ” & Mid(TempPacket, 5, 2) & ” ” & Right(TempPacket, 2)
End Function
Public Function sendhash(datin As String, password As String)
sendhash= HextoAscii(“02 00 CA 00 02 00 00 00 0A 00 01 00 00 00 04 ” & GenerateHasCode(Right(datin, UnHex(Asciitohex(Mid(datin, (UnHex(Asciitohex(Mid(datin, 15, 1))) + 21), 1)))) & password))
End Function
CHANGE PRESENCE PACKET
Code:
Public Function set_online() As String
set_online = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 01″)
increment = increment + 1
End FunctionPublic Function set_offline() As String
set_offline = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 63″)
increment = increment + 1
End FunctionPublic Function set_away() As String
set_away = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 04″)
increment = increment + 1
End Function
Public Function set_busy() As String
set_busy = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 03″)
increment = increment + 1
End Function
JOIN ROOM:
Code:
Public Function JoinRoom(room As String)
JoinRoom = HextoAscii(“02 02 BF 00 ” & Hex(increment) & ” 00 00 00 ” & DecToHexStr(Len(room) + 6) & ” 00 01 00 00 00 ” & DecToHexStr(Len(room)) & ” ” & Asciitohex(room))
increment = increment + 1
End Function
LEAVE ROOM
Code:
Public Function LeaveRoom(room As String)
LeaveRoom = HextoAscii(“02 02 C0 00 ” & Hex(increment) & ” 00 00 00 ” & DecToHexStr(Len(room) + 6) & ” 00 01 00 00 00 ” & DecToHexStr(Len(room)) & ” ” & Asciitohex(room))
increment = increment + 1
End Function
GET ROOM USER LIST:
Code:
Public Function SpyRoom(room As String)
SpyRoom = (HextoAscii(“02 02 C3 00 10 00 00 00 ” & DecToHexStr(Len(room) + 6) & ” 00 01 00 00 00 ” & DecToHexStr(Len(room))) & room)
increment = increment + 1
End Function
ROOM SEND MSG:
Code:
Public Function SendTextRoom(user As String, kata As String, room As String)
SendTextRoom = HextoAscii(“02 01 F4 00 ” & Hex(increment) & ” 00 00 00 ” & DecToHexStr(Len(user) + 40 + Len(room) + Len(kata)) & ” 00 08 00 00 00 ” & DecToHexStr(Len(kata)) & ” ” & Asciitohex(kata) & ” 00 06 00 00 00 02 00 01 00 04 00 00 00 ” & DecToHexStr(Len(room)) & ” ” & Asciitohex(room) & ” 00 03 00 00 00 01 03 00 02 00 00 00 ” & DecToHexStr(Len(user)) & ” ” & Asciitohex(user) & ” 00 01 00 00 00 01 01″)
increment = increment + 1
End Function
Kick Function
Code:
Private Sub kick()
tcpclient.SendData Chr(&H2) & Chr(&H2) & Chr(&HC2) & Chr(&H0) & Chr(&HD) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(12 + Len(txtchatroom.Text) +
Len(txtkickname.Text)) & Chr(&H0) & Chr(&H2) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtkickname.Text)) & txtkickname.Text & Chr(&H0) & Chr(&H1) & Chr(&H0) & hr(&H0) & Chr(&H0) & Chr(Len(txtchatroom.Text)) &
txtchatroom.Text
End Sub
Check Account Balance
HextoAscii(“02 03 85 00 05 00 00 00 00″)
Private A User
Chr(&H2) & Chr(&H1) & Chr(&HF4) & Chr(&H0) & Chr(&H7) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(40 + Len(txtsend1.Text) + Len(txtpvt.Text) + Len(txtdisplay.Text)) & Chr(&H0) & Chr(&H8) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtsend1.Text)) & txtsend1.Text & Chr(&H0) & Chr(&H6) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(&H2) & Chr(&H0) & Chr(1) & Chr(&H0) & Chr(&H4) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtpvt.Text)) & txtpvt.Text & Chr(&H0) & Chr(&H3) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(&H1) & Chr(&H1) & Chr(&H0) & Chr(2) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtdisplay)) & txtdisplay & Chr(&H0) & Chr(&H1) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(&H1) & Chr(&H1)
Create Group Chat
Public Function CreateGroup(txtuname As String, T1 As String)
CreateGroup = HextoAscii(“02 02 EF 00 41 00 00 00 ” & DecToHexStr(Len(txtuname) + Len(T1) + 12) & ” 00 02 00 00 00 ” & DecToHexStr(Len(txtuname))) & txtuname & HextoAscii(“00 01 00 00 00 ” & DecToHexStr(Len(T1))) & T1
increment = increment + 1
End Function
Invite Gc
Public Function InviteGC(ByVal target As String, ByVal GcId As String) As String
InviteGC = HexToAscii(“02 02 F0 00 3B ” & DecToHexFull(Len(target) + Len(GcId) + 12) & ” 00 02 ” & DecToHexFull(Len(target))) & target & HexToAscii(” 00 01 ” & DecToHexFull(Len(GcId))) & GcId
End Function
Send Text In GC
Public Function SendTextGc(user As String, gcId As String, TxTGc As String) As String
SendTextGc = HextoAscii(“02 01 F4 00 05 00 00 00 ” & DecToHexStr(Len(TxTGc) + Len(user) + 48) & ” 00 08 00 00 00 ” & DecToHexStr(Len(TxTGc))) & TxTGc & HextoAscii(“00 06 00 00 00 02 00 01 00 04 00 00 00 08″) & gcId & HextoAscii(“00 03 00 00 00 01 02 00 02 00 00 00 ” & DecToHexStr(Len(user))) & user & HextoAscii(“00 01 00 00 00 01 01″)
End Function
Add Moderator
Public Function AddMod(rm As String, target As String)
Dim atX As String
atX = “c=chatroom&a=add_moderator&v=midlet&roomName=” & rm & “&name=” & target
AddMod = HextoAscii(“02 03 9A 00 1B 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
ReMove Moderator
Public Function RemMod(rm As String, target As String)
Dim s As String
s = “http://www.mig33.com/sites/index.php?c=chatroom&v=midlet&a=remove_moderator&name=” & target & “&roomName=” & rm
RemMod = HextoAscii(“02 03 9A 00 3E 00 00 00 ” & DecToHexStr((Len(s) + 23)) & ” 00 04 00 00 00 04 00 00 00 01 00 02 00 00 00 ” & DecToHexStr(Len(s)) & ” ” & Asciitohex(s) & ” 00 01 00 00 00 01 01″)
End Function
Banned a user
Public Function Ban(rm As String, target As String)
Dim atX As String
atX = “c=chatroom&a=ban_user&v=midlet&roomName=” & rm & “&name=” & target
Ban = HextoAscii(“02 03 9A 00 1B 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
UnBanned A User
Public Function UnBan(rm As String, target As String)
Dim s As String
s = “http://www.mig33.com/sites/index.php?c=chatroom&v=midlet&a=unban_user&name=” & target & “&roomName=” & rm
UnBan = HextoAscii(“02 03 9A 00 33 00 00 00 ” & DecToHexStr((Len(s) + 23)) & ” 00 04 00 00 00 04 00 00 00 01 00 02 00 00 00 ” & DecToHexStr(Len(s)) & ” ” & Asciitohex(s) & ” 00 01 00 00 00 01 01″)
End Function
Comment On Avatar
Public Function AvtrPost(uname As String, cmnt As String)
Dim atX As String
atX = “c=avatar&v=midlet&a=comment_post_submit&username=” & uname & “&bd=” & cmnt
AvtrPost = HextoAscii(“02 03 9A 00 7C 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Create Room
Public Function createrm(name as string)
Dim atX as string
atX=”c=chatroom&v=midlet&a=create_submit&roomName=” & name & “&language=ENG&allow_kicking=on”
createrm = HextoAscii(“02 03 9A 00 2C 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Create Group
Public Function grpreate(name As String, typee As String, email As String, dsc As String)
Dim atX As String
atX = “c=group&v=midlet&a=create_group_submit&f=create&name=” & name & “&ty=” & typee & “&email=” & email & “&dsc=” & dsc
grpreate = HextoAscii(“02 03 9A 00 17 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Search Group
Public Function grpsrch(name as string)
Dim atX as string
atX=”c=group&v=midlet&a=search&cid=0&name=” & name
grpsrch = HextoAscii(“02 03 9A 00 36 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Invite Group
Public Function InviteGroup(cid As String, At As String, target As String)
Dim atX As String
atX = “http://www.mig33.com/sites/index.php?c=group&v=midlet&a=invite_contacts&cid=” & cid & “&f=&p=” & At
InviteGroup = HextoAscii(“02 03 9A 00 17 00 00 00 ” & DecToHexStr(Len(atX) + 35) & ” 00 04 00 00 00 04 00 00 00 01 00 03 00 00 00 ” & DecToHexStr(Len(target) + 3) & ” ” & Asciitohex(target) & ” 3D 6F 6E 00 02 00 00 00 ” & DecToHexStr(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 01 00 00 00 01 02″)
End Function
Accept Add Request
Public Function AddAcpt(name As String)
Dim atX As String
atX = “c=invite&v=midlet&a=accept&username=” & name & “&p=1&group=0″
AddAcpt = HextoAscii(“02 03 9A 00 25 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Add Contact
Public Function AddContact(ByVal IdGroup As String, ByVal target As String)
AddContact = HexToAscii(“02 01 95 00 17 ” & DecToHexFull(Len(IdGroup) + Len(target) + 19) & ” 00 18 00 00 00 01 00 00 02 ” & DecToHexFull(Len(IdGroup)) & AsciiToHex(IdGroup) & ” 00 0C ” & DecToHexFull(Len(target)) & AsciiToHex(target))
End Function
Avaatar Vote
Public Function AvatarVote(target As String, id As String, bid As String)
Dim at As String
at = “http://www.mig33.com/sites/index.php?c=fshow&a=play&v=midlet&voteForID=” & id & “&voteForName=” & target & “&bid=” & bid
AvatarVote = HextoAscii(“02 03 9A 00 42 00 00 00 ” & DecToHexStr((Len(at) + 23)) & ” 00 04 00 00 00 04 00 00 00 01 00 02 00 00 00 ” & DecToHexStr(Len(at)) & ” ” & Asciitohex(at) & ” 00 01 00 00 00 01 01″)
End Function
Mig33 Data Arrival Headers
“00 09 00 00 00 01 01″ <— Incomming Admin/mod Roomchat”2 0 C9 0″ <—— Acknowledge to send hashcode
“2 1 9C 0″ <—— Success full Login
“2 0 0 0 2″ <—– Login failed
“2 1 9C 0 0″ <—- Incomming Invitation Request
“0 6 0 0 0 1″ <—- get mobile number of Login ID
“2 1 A5 0″ <—— Get status msg of contact
“2 1 94 0″ <—— Get Presence of contact ID
“1 1 0 1″ <—– get Online presence of contact id
“1 4 0 1″ <—– get Away presence of contact id
“1 3 0 1″ <—– get Busy presence of contact id
“1 63 0 1″ <—– get Offline presence of contact id
“2 1 93 0 3 0 0 0 0″ <—- Acknowledge to Download contact list successfully !
“2 1 91 0″ <—– Get contact lists Groups
“2 1 92 0″ <—– Get contact lists username
“2 2 C4 0″ <—– Get Room user’s list
“2 1 F4 0″ <—– Get Room chat
“2 3 86 0″ <—– Get Account info
“02010A” <—– Get block list
“0202BD” <—– Get chat room list
“02025B” <—– Get avater string
“020005″ <—– Get room info
“0201A5″ <—– Get contact list status
“0201A6″ <—– Get update tab status
“02039B” <—– All pakets buffering header
enjoy proggaming
Len
Description: Returns a Long containing the length of the specified string
Syntax: Len(string)
Example: lngLen = Len(“At Zone”) ‘ lngLen = 7
Mid
Description: Returns a substring containing a specified number of characters from a string.
Syntax: Mid$(string, start[, length])
Example:
strSubstr = Mid$(“At Zone”, 3, 4) ‘ strSubstr = “Zon”
Mid$ can also be used on the left side of an assignment statement, where you can replace a substring within a string.
strtest = “At Zone”
Mid$(strtest, 3, 1) = “-”
‘strTest now contains “At-Zone”
Left
Description: Returns a substring containing a specified number of characters from the beginning (left side) of a string.
Syntax: Left$(string, length)
Example: strSubstr = Left$(“At-Zone”, 3) ‘ strSubstr = “At-”
‘ Note that the same thing could be accomplished with Mid$:
strSubstr = Mid$(“At-Zone”, 3, 3) ‘ strSubstr = “-Zo”
Right
Description: Returns a substring containing a specified number of characters from the end (right side) of a string.
Syntax: Right$(string, length)
Example: strSubstr = Right$(“At-Zone”, 3) ‘ strSubstr = “one”
‘ Note that the same thing could be accomplished with Mid$:
strSubstr = Mid$(“At-Zone”, 2, 3) ‘ strSubstr = “t-Z”
InStr
Description: Returns a Long specifying the position of one string within another. The search starts either at the first character position or at the position specified by the start argument, and proceeds forward toward the end of the string (stopping when either string2 is found or when the end of the string1 is reached).
Syntax: InStr([start,] string1, string2 [, compare])
Example: lngPos = InStr(“At-Zone”, “Z”)
‘ lngPos = 4
lngPos = InStr(3, “At-Zone”, “o”)
‘ lngPos = 5 (starting at position 6)
lngPos = InStr(“At-Zone”, “Z”)
‘ lngPos = 4 (case-sensitive search)
lngPos = InStr(1, “At-Zone”, “n”, 1)
‘ lngPos = 6 (case-insensitive search)
String
Description: Returns a string containing a repeating character string of the length specified.
Syntax: String$(number, character)
Example:strTest = String$(5, “a”)
‘ strTest = “aaaaa”
strTest = String$(5, 97)
‘ strTest = “aaaaa” (97 is the ASCII code for “a”)
Replace
Description: Returns a string in which a specified substring has been replaced with another substring a specified number of times.
Syntax: Replace$(expression, find, replacewith[, start[, count[, compare]]])
Example:strNewDate = Replace$(“05/05/2011″, “/”, “-”)
‘ strNewDate = “05-05-2011″
Chr
Description: Returns a string containing the character associated with the specified character code.
Syntax: Chr$(charcode)
Example: strChar = Chr$(65) ‘ strChar = “A”
This codes are given by turjo.tnx to him….
MIG33 Packets N Functions
LOGIN PACKET (MIG.V3)
Code:
Public Function SendUname(uname As String)
SendUname = (HextoAscii("02 00 C8 00 02 00 00 00 " & DecToHexStr(Len(uname) + 172) & " 00 16 00 00 00 00 00 15 00 00 00 00 00 14 00 00 00 00 00 13 00 00 00 01 00 00 11 00 00 00 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 1D 6D 69 67 33 33 2F 34 2E 36 32 20 28 55 6E 6B 6E 6F 77 6E 29 20 6B 42 72 6F 77 73 65 72 00 07 00 00 00 0D 4A 32 4D 45 76 34 2E 36 32 2E 30 30 30 00 05 00 00 00 " & DecToHexStr(Len(uname)) & " " & Asciitohex(uname) & " 00 03 00 00 00 02 01 CE 00 02 00 00 00 01 02 00 01 00 00 00 02 00 01"))
End Function
LOGIN PACKET V4.6
Code:
Public Function login(Username As String)
login= HextoAscii(“02 00 C8 00 01 00 00 00 ” & (DecToHexStr(Len(Username) + 73)) & ” 00 09 00 00 00 04 00 00 00 01 00 08 00 00 00 04 6A 32 6D 65 00 07 00 00 00 12 4A 32 4D 45 76 33 2E 30 31 20 4D 49 44 50 2D 31 2E 30 00 05 00 00 00 ” & DecToHexStr(Len(Username)) & ” ” & Asciitohex(Username) & ” 00 03 00 00 00 02 01 2D 00 02 00 00 00 01 01 00 01 00 00 00 02 00 01″)
End Function
LOGIN PACKET (MIG.V4)
Code:
Public Function loginv4(Username As String)
loginv4 = HextoAscii(“02 00 C8 00 03 00 00 00 ” & DecToHexStr(Len(Username) + 123) & ” 00 13 00 00 00 01 01 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 30 35 2E 32 35 39 00 05 00 00 00 ” & DecToHexStr(Len(Username)) & ” ” & Asciitohex(Username) & ” 00 03 00 00 00 02 01 95 00 02 00 00 00 01 02 00 01 00 00 00 02 00 01″)
End Function
HASHCODE CONVERTER & SEND HASHCODE PACKET
Code:
Public Function hashCode(Value)
Dim i As Integer
Const maxInt = 4294967295#
Const maxPostInt = 2147483647Dim h As Currency
Dim div As Longh = 0
For i = 1 To Len(Value)
h = h * 31 + Asc(Mid(Value, i, 1))
If (h > maxInt) Then
div = Int(h / (maxInt + 1))
h = h – (div * (maxInt + 1))
End If
Next i
If h > maxPostInt Then
h = h – maxInt – 1
End If
hashCode = h
End Function
Public Function GenerateHasCode(Packet As String) As String
Dim aLong As Long
Dim TempPacket As String
aLong = hashCode(Packet)
TempPacket = Right(“00000000″ & Hex(aLong),
GenerateHasCode = Left$(TempPacket, 2) & ” ” & Mid$(TempPacket, 3, 2) & ” ” & Mid(TempPacket, 5, 2) & ” ” & Right(TempPacket, 2)
End Function
Public Function sendhash(datin As String, password As String)
sendhash= HextoAscii(“02 00 CA 00 02 00 00 00 0A 00 01 00 00 00 04 ” & GenerateHasCode(Right(datin, UnHex(Asciitohex(Mid(datin, (UnHex(Asciitohex(Mid(datin, 15, 1))) + 21), 1)))) & password))
End Function
CHANGE PRESENCE PACKET
Code:
Public Function set_online() As String
set_online = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 01″)
increment = increment + 1
End FunctionPublic Function set_offline() As String
set_offline = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 63″)
increment = increment + 1
End FunctionPublic Function set_away() As String
set_away = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 04″)
increment = increment + 1
End Function
Public Function set_busy() As String
set_busy = HextoAscii(“02 02 58 00 ” & Hex(increment) & ” 00 00 00 07 00 01 00 00 00 01 03″)
increment = increment + 1
End Function
JOIN ROOM:
Code:
Public Function JoinRoom(room As String)
JoinRoom = HextoAscii(“02 02 BF 00 ” & Hex(increment) & ” 00 00 00 ” & DecToHexStr(Len(room) + 6) & ” 00 01 00 00 00 ” & DecToHexStr(Len(room)) & ” ” & Asciitohex(room))
increment = increment + 1
End Function
LEAVE ROOM
Code:
Public Function LeaveRoom(room As String)
LeaveRoom = HextoAscii(“02 02 C0 00 ” & Hex(increment) & ” 00 00 00 ” & DecToHexStr(Len(room) + 6) & ” 00 01 00 00 00 ” & DecToHexStr(Len(room)) & ” ” & Asciitohex(room))
increment = increment + 1
End Function
GET ROOM USER LIST:
Code:
Public Function SpyRoom(room As String)
SpyRoom = (HextoAscii(“02 02 C3 00 10 00 00 00 ” & DecToHexStr(Len(room) + 6) & ” 00 01 00 00 00 ” & DecToHexStr(Len(room))) & room)
increment = increment + 1
End Function
ROOM SEND MSG:
Code:
Public Function SendTextRoom(user As String, kata As String, room As String)
SendTextRoom = HextoAscii(“02 01 F4 00 ” & Hex(increment) & ” 00 00 00 ” & DecToHexStr(Len(user) + 40 + Len(room) + Len(kata)) & ” 00 08 00 00 00 ” & DecToHexStr(Len(kata)) & ” ” & Asciitohex(kata) & ” 00 06 00 00 00 02 00 01 00 04 00 00 00 ” & DecToHexStr(Len(room)) & ” ” & Asciitohex(room) & ” 00 03 00 00 00 01 03 00 02 00 00 00 ” & DecToHexStr(Len(user)) & ” ” & Asciitohex(user) & ” 00 01 00 00 00 01 01″)
increment = increment + 1
End Function
Kick Function
Code:
Private Sub kick()
tcpclient.SendData Chr(&H2) & Chr(&H2) & Chr(&HC2) & Chr(&H0) & Chr(&HD) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(12 + Len(txtchatroom.Text) +
Len(txtkickname.Text)) & Chr(&H0) & Chr(&H2) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtkickname.Text)) & txtkickname.Text & Chr(&H0) & Chr(&H1) & Chr(&H0) & hr(&H0) & Chr(&H0) & Chr(Len(txtchatroom.Text)) &
txtchatroom.Text
End Sub
Check Account Balance
HextoAscii(“02 03 85 00 05 00 00 00 00″)
Private A User
Chr(&H2) & Chr(&H1) & Chr(&HF4) & Chr(&H0) & Chr(&H7) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(40 + Len(txtsend1.Text) + Len(txtpvt.Text) + Len(txtdisplay.Text)) & Chr(&H0) & Chr(&H8) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtsend1.Text)) & txtsend1.Text & Chr(&H0) & Chr(&H6) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(&H2) & Chr(&H0) & Chr(1) & Chr(&H0) & Chr(&H4) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtpvt.Text)) & txtpvt.Text & Chr(&H0) & Chr(&H3) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(&H1) & Chr(&H1) & Chr(&H0) & Chr(2) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(Len(txtdisplay)) & txtdisplay & Chr(&H0) & Chr(&H1) & Chr(&H0) & Chr(&H0) & Chr(&H0) & Chr(&H1) & Chr(&H1)
Create Group Chat
Public Function CreateGroup(txtuname As String, T1 As String)
CreateGroup = HextoAscii(“02 02 EF 00 41 00 00 00 ” & DecToHexStr(Len(txtuname) + Len(T1) + 12) & ” 00 02 00 00 00 ” & DecToHexStr(Len(txtuname))) & txtuname & HextoAscii(“00 01 00 00 00 ” & DecToHexStr(Len(T1))) & T1
increment = increment + 1
End Function
Invite Gc
Public Function InviteGC(ByVal target As String, ByVal GcId As String) As String
InviteGC = HexToAscii(“02 02 F0 00 3B ” & DecToHexFull(Len(target) + Len(GcId) + 12) & ” 00 02 ” & DecToHexFull(Len(target))) & target & HexToAscii(” 00 01 ” & DecToHexFull(Len(GcId))) & GcId
End Function
Send Text In GC
Public Function SendTextGc(user As String, gcId As String, TxTGc As String) As String
SendTextGc = HextoAscii(“02 01 F4 00 05 00 00 00 ” & DecToHexStr(Len(TxTGc) + Len(user) + 48) & ” 00 08 00 00 00 ” & DecToHexStr(Len(TxTGc))) & TxTGc & HextoAscii(“00 06 00 00 00 02 00 01 00 04 00 00 00 08″) & gcId & HextoAscii(“00 03 00 00 00 01 02 00 02 00 00 00 ” & DecToHexStr(Len(user))) & user & HextoAscii(“00 01 00 00 00 01 01″)
End Function
Add Moderator
Public Function AddMod(rm As String, target As String)
Dim atX As String
atX = “c=chatroom&a=add_moderator&v=midlet&roomName=” & rm & “&name=” & target
AddMod = HextoAscii(“02 03 9A 00 1B 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
ReMove Moderator
Public Function RemMod(rm As String, target As String)
Dim s As String
s = “http://www.mig33.com/sites/index.php?c=chatroom&v=midlet&a=remove_moderator&name=” & target & “&roomName=” & rm
RemMod = HextoAscii(“02 03 9A 00 3E 00 00 00 ” & DecToHexStr((Len(s) + 23)) & ” 00 04 00 00 00 04 00 00 00 01 00 02 00 00 00 ” & DecToHexStr(Len(s)) & ” ” & Asciitohex(s) & ” 00 01 00 00 00 01 01″)
End Function
Banned a user
Public Function Ban(rm As String, target As String)
Dim atX As String
atX = “c=chatroom&a=ban_user&v=midlet&roomName=” & rm & “&name=” & target
Ban = HextoAscii(“02 03 9A 00 1B 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
UnBanned A User
Public Function UnBan(rm As String, target As String)
Dim s As String
s = “http://www.mig33.com/sites/index.php?c=chatroom&v=midlet&a=unban_user&name=” & target & “&roomName=” & rm
UnBan = HextoAscii(“02 03 9A 00 33 00 00 00 ” & DecToHexStr((Len(s) + 23)) & ” 00 04 00 00 00 04 00 00 00 01 00 02 00 00 00 ” & DecToHexStr(Len(s)) & ” ” & Asciitohex(s) & ” 00 01 00 00 00 01 01″)
End Function
Comment On Avatar
Public Function AvtrPost(uname As String, cmnt As String)
Dim atX As String
atX = “c=avatar&v=midlet&a=comment_post_submit&username=” & uname & “&bd=” & cmnt
AvtrPost = HextoAscii(“02 03 9A 00 7C 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Create Room
Public Function createrm(name as string)
Dim atX as string
atX=”c=chatroom&v=midlet&a=create_submit&roomName=” & name & “&language=ENG&allow_kicking=on”
createrm = HextoAscii(“02 03 9A 00 2C 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Create Group
Public Function grpreate(name As String, typee As String, email As String, dsc As String)
Dim atX As String
atX = “c=group&v=midlet&a=create_group_submit&f=create&name=” & name & “&ty=” & typee & “&email=” & email & “&dsc=” & dsc
grpreate = HextoAscii(“02 03 9A 00 17 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Search Group
Public Function grpsrch(name as string)
Dim atX as string
atX=”c=group&v=midlet&a=search&cid=0&name=” & name
grpsrch = HextoAscii(“02 03 9A 00 36 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Invite Group
Public Function InviteGroup(cid As String, At As String, target As String)
Dim atX As String
atX = “http://www.mig33.com/sites/index.php?c=group&v=midlet&a=invite_contacts&cid=” & cid & “&f=&p=” & At
InviteGroup = HextoAscii(“02 03 9A 00 17 00 00 00 ” & DecToHexStr(Len(atX) + 35) & ” 00 04 00 00 00 04 00 00 00 01 00 03 00 00 00 ” & DecToHexStr(Len(target) + 3) & ” ” & Asciitohex(target) & ” 3D 6F 6E 00 02 00 00 00 ” & DecToHexStr(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 01 00 00 00 01 02″)
End Function
Accept Add Request
Public Function AddAcpt(name As String)
Dim atX As String
atX = “c=invite&v=midlet&a=accept&username=” & name & “&p=1&group=0″
AddAcpt = HextoAscii(“02 03 9A 00 25 00 00 00 ” & DecToHexStr(Len(atX) + 65) & ” 00 04 00 00 00 04 00 00 00 01 00 03 ” & DecToHexFull(Len(atX)) & ” ” & Asciitohex(atX) & ” 00 02 00 00 00 24 68 74 74 70 3A 2F 2F 77 77 77 2E 6D 69 67 33 33 2E 63 6F 6D 2F 73 69 74 65 73 2F 69 6E 64 65 78 2E 70 68 70 00 01 00 00 00 01 02″)
End Function
Add Contact
Public Function AddContact(ByVal IdGroup As String, ByVal target As String)
AddContact = HexToAscii(“02 01 95 00 17 ” & DecToHexFull(Len(IdGroup) + Len(target) + 19) & ” 00 18 00 00 00 01 00 00 02 ” & DecToHexFull(Len(IdGroup)) & AsciiToHex(IdGroup) & ” 00 0C ” & DecToHexFull(Len(target)) & AsciiToHex(target))
End Function
Avaatar Vote
Public Function AvatarVote(target As String, id As String, bid As String)
Dim at As String
at = “http://www.mig33.com/sites/index.php?c=fshow&a=play&v=midlet&voteForID=” & id & “&voteForName=” & target & “&bid=” & bid
AvatarVote = HextoAscii(“02 03 9A 00 42 00 00 00 ” & DecToHexStr((Len(at) + 23)) & ” 00 04 00 00 00 04 00 00 00 01 00 02 00 00 00 ” & DecToHexStr(Len(at)) & ” ” & Asciitohex(at) & ” 00 01 00 00 00 01 01″)
End Function
Mig33 Data Arrival Headers
“00 09 00 00 00 01 01″ <— Incomming Admin/mod Roomchat”2 0 C9 0″ <—— Acknowledge to send hashcode
“2 1 9C 0″ <—— Success full Login
“2 0 0 0 2″ <—– Login failed
“2 1 9C 0 0″ <—- Incomming Invitation Request
“0 6 0 0 0 1″ <—- get mobile number of Login ID
“2 1 A5 0″ <—— Get status msg of contact
“2 1 94 0″ <—— Get Presence of contact ID
“1 1 0 1″ <—– get Online presence of contact id
“1 4 0 1″ <—– get Away presence of contact id
“1 3 0 1″ <—– get Busy presence of contact id
“1 63 0 1″ <—– get Offline presence of contact id
“2 1 93 0 3 0 0 0 0″ <—- Acknowledge to Download contact list successfully !
“2 1 91 0″ <—– Get contact lists Groups
“2 1 92 0″ <—– Get contact lists username
“2 2 C4 0″ <—– Get Room user’s list
“2 1 F4 0″ <—– Get Room chat
“2 3 86 0″ <—– Get Account info
“02010A” <—– Get block list
“0202BD” <—– Get chat room list
“02025B” <—– Get avater string
“020005″ <—– Get room info
“0201A5″ <—– Get contact list status
“0201A6″ <—– Get update tab status
“02039B” <—– All pakets buffering header
enjoy proggaming
Last edited by sahriya-omu on Wed Apr 11, 2012 3:38 pm; edited 1 time in total
Re: mig33 packets function
mama pvt text send ar cmd button ar under a code ki hobe = socket.senddata 1 pvttxt(pvttext.text , target,"") ai ta ?
sms91- Co-Admin
- Posts : 66
Points : 151
Reputation : 8
Join date : 2011-08-15
Age : 34
Location : ctg
Re: mig33 packets function
ow realy this is good paket data thanzzzzzzz :X:X:X:X:X:X:X:X:X:X::P:P:P:P:P:P:)
Similar topics
» Mig33 Chat v1.8.0.7
» AKAM33 and mig33
» mig33 extra
» [UMF] Ultimate Mig33 Fucker By fajiil-
» Mig33 ID login Project tools
» AKAM33 and mig33
» mig33 extra
» [UMF] Ultimate Mig33 Fucker By fajiil-
» Mig33 ID login Project tools
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
Thu Apr 09, 2020 3:53 am by love62
» Dark B00mb3r by fajiil-(free)
Mon Apr 11, 2016 3:22 pm by me.punk.7
» ID creator with proxy changer and gmail dot generator
Sat Apr 09, 2016 7:47 pm by me.punk.7
» Unlimited Ids Login , Balance And Level Checker
Sat Apr 09, 2016 7:45 pm by me.punk.7
» Multy credit transfer project
Sun Feb 21, 2016 6:53 am by rezkiye
» Sockmix v2.6 Fresh Project
Fri Nov 20, 2015 12:08 pm by papeshh
» Offline Registration SYstem And Key Generator By DevelopMig33.Tk
Fri Nov 20, 2015 12:08 pm by papeshh
» All Ocx Box
Thu Oct 22, 2015 7:26 am by papeshh
» multy maker + auto activator ( updated )
Thu Oct 22, 2015 7:15 am by papeshh