Ok, I am positive that I am sending the correct data buffer to Bnet however I get an error, I'm not recieving any data. I'm thinking that it is probably due to my function that I use to recieve data from a socket. Here is the function:
char* recvPacket(SOCKET sck)
{
int nBytes;
char *tempbuf = new char[512];
nBytes = recv(sck, tempbuf, 512, 0);
if ((nBytes == SOCKET_ERROR) || (nBytes <= 0)) {
delete [] tempbuf;
printf("Recv Failed!\n");
return 0;
}
else {
printf("Message Received.\n");
DebugOutput(tempbuf, nBytes);
return tempbuf;
}
}
I am trying to send the 0x50 BNCS packet, SID_AUTH_INFO.
I've successfully sent and recieved the BNLS 0x10 packet, BNLS_REQUESTVERSIONBYTE. I am very sure that I am sending a correct buffer b/c I've compared what I'm sending to a packet log that I did using both StealthBot and Warcraft III!
Well... you have a packet logger... why don't you see if you are recieving data or not?
Quote from: Soul Taker on December 25, 2004, 10:44 AM
Well... you have a packet logger... why don't you see if you are recieving data or not?
I said in the post above that I'm recieving nothing. packet size 0.
WSAGetLastError()?
Hehe, I woke up like at 2:45 AM and then couldn't go back to sleep. While I was laying in bed I was going over what possibly be the problem. I thought back to when I had done my bot in VB and 5 minutes later I remember that I had to send the byte 0x01 first, before I send any other data to BNET. I was so curious to debug and see if this was my problem that I said fuck this and went to my computar.
Guess what? My problem was exactly what I thought!
phew, I'm so relieved.
Ive done that before rofl I must of looked At BnetDocs / asked a million friends before I realized I wasnt sending it either . :P