Whenever I try to add winsock to my form I end up getting a "license information not found" error. Dose anyone know how to fix or get by this?
If there is no way to get the license then,
Is CSocket just as good?? CSocket (http://www.vbip.com/winsock-api/csocket-class/csocket-class-01.asp)
If you are using the Standard version of Microsoft Visual Studio, you cannot use the winsock control.
I gess I'm useing the standard vershion then. What else could I use? I did a search and found CSocket, but I don't know if it's compairable to winsock.
It's better than Winsock.
Quote from: Tontow on May 10, 2005, 12:10 PM
Whenever I try to add winsock to my form I end up getting a "license information not found" error. Dose anyone know how to fix or get by this?
VB Learning ediion.
You need enterprize or pro edition to use winsock controlls.
Altho i think u can get them for learning, not sure how tho.
Download a crack for it like i did. Umm oops. Yeah.
Search for: Visual basic 6 Enterprise edition crack on google.
Thanks. I'll try useing CSocket for now.
Dose anyone know of a good packet tutorial? (sending/reading/creating/etc)
What kind of packet? (almost) Every program that sends packets uses a different format, ie BNCS packets != AIM packets.
well perferably the packets a chat bot would send to log on to battlenet though bnls, but it would be nice to know how to do the ones you would send to log on to battle net (not being able to go into private channels).
CHAT packet structure is Telnet plain-text standard.
Ok, I did some searching and found http://botdev.valhallalegends.com/documents/vbpacketbc.html , but I have a few questions.
QuoteFunction MakeDWORD(Value As Long) As String
Dim Result As String * 4
CopyMemory ByVal Result, Value, 4
MakeDWORD = Result
End Function
Why the *4?
Do I send each DWORD seperatly or together in one string?
Quote from: Tontow on May 12, 2005, 01:15 AM
Ok, I did some searching and found http://botdev.valhallalegends.com/documents/vbpacketbc.html , but I have a few questions.
QuoteFunction MakeDWORD(Value As Long) As String
Dim Result As String * 4
CopyMemory ByVal Result, Value, 4
MakeDWORD = Result
End Function
Why the *4?
Do I send each DWORD seperatly or together in one string?
* 4 allocates 4 bytes of space in Result. It's needed in this case because CopyMemory is being used to copy Value to Result. If there's no space available in Result, you can't copy and your program will probably crash. You could also use something like
Result = Space(4) or
Result = String(vbNullChar, 4)
Quote from: Tontow on May 12, 2005, 01:15 AMDo I send each DWORD seperatly or together in one string?
You could send each DWORD alone, after youve sent the header for the packet, But I wouldnt recomend it, I would recomend building the eintire packet locally, and then sending it all together.
Quote from: UserLoser on May 12, 2005, 06:48 AM
Result = String(vbNullChar, 4)
Result = String(4, vbNullChar)~-~(HDX)~-~
Ok, Let me see if I'm doing the packets right.
Acording to bnetdocs.com the Logon Sequence for a chat bot is:
Quote
SEND -> Protocol byte (01)
SEND -> SID_AUTH_INFO (0x50)
RECV <- SID_PING (0x25)
RECV <- SID_AUTH_INFO (0x50)
SEND -> SID_PING (0x25) [Optional]
SEND -> SID_AUTH_CHECK (0x51)
RECV <- SID_AUTH_CHECK (0x51)
SEND -> SID_LOGONRESPONSE (0x29)
RECV <- SID_LOGONRESPONSE (0x29)
SEND -> SID_UDPPINGRESPONSE (0x14) [SEXP/STAR/W2BN]
SEND -> SID_ENTERCHAT (0x0A)
And the format for the protocol byte is:
Quote
BNCS Headers
BNCS stands for Battle.Net Chat Server and is the protocol that Blizzard's Battle.net enabled games use to communicate. Every BNCS message has the same header:
(BYTE) Always 0xFF
(BYTE) Message ID
(WORD) Message length, including this header
(VOID) Message Data
The BNCS protocol is aggresively enforced by Battle.net - at least, for clients - and violations of the protocol generally result in an IP ban.
When connecting to a BNCS server, you must first tell the server which protocol you wish to use. Some of the Protocol IDs are:
Games: 0x01
FTP: 0x02
Chat: 0x03
So to send the protocol packet the code would be?
Quote
Function MakeWORD(Value As Integer) As String
Dim Result As String * 2
CopyMemory ByVal Result, Value, 2
MakeWORD = Result
End Function
Public function sendprotocall()
sckclient.SendData &HFF
sckclient.SendData (1)
sckclient.SendData MakeWORD(Len(buffer) + 4)
sckclient.SendData &H3
end function
Quote from: Tontow on May 12, 2005, 09:37 PM
Public function sendprotocall()
sckclient.SendData &HFF
sckclient.SendData (1)
sckclient.SendData MakeWORD(Len(buffer) + 4)
sckclient.SendData &H3
end function
You only want to send the protocol byte once at the start and its before &HFF.
So it should be?
Quote
Public function sendprotocall()
sckclient.SendData &H3 'id for chat
sckclient.SendData &HFF ' byte
sckclient.SendData (1) 'message id
sckclient.SendData MakeWORD(Len(buffer) + 4) 'Message length
end function
No...
The format you said is a binary BNCS packet sent to Battle.Net after specifying that you will be using plaintext Telnet format. That is a very bad thing to do.
So all i have to send
Quote
sckclient.SendData &H3
sckclient.SendData "[email protected]"
[email protected] "pass"
correct?
(note: I'm trying to learn to connect regularly to battlenet with telnet for chat/bot befor I try useing blns to log on - kinda a walk befor you run thing for me)