Author | Message | Time |
---|---|---|
bethra | 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: [code] 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; } } [/code] 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! | December 25, 2004, 3:33 PM |
Soul Taker | Well... you have a packet logger... why don't you see if you are recieving data or not? | December 25, 2004, 4:44 PM |
bethra | [quote author=Soul Taker link=topic=10014.msg93489#msg93489 date=1103993063] Well... you have a packet logger... why don't you see if you are recieving data or not? [/quote] I said in the post above that I'm recieving nothing. packet size 0. | December 25, 2004, 5:01 PM |
Mephisto | WSAGetLastError()? | December 25, 2004, 5:30 PM |
bethra | 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. | December 29, 2004, 12:04 PM |
Quarantine | Ive done that before rofl I must of looked At BnetDocs / asked a million friends before I realized I wasnt sending it either . :P | December 29, 2004, 8:24 PM |