Author | Message | Time |
---|---|---|
Undeadwarrior | I know how to send data with vb but i cant seem to send data to the battle.net servers in the proper format so to speak. Im logging using ethereal and i am sending data to the server but no matter what i seem to do its never the proper format. Any help or links to information would be awsome. | August 27, 2006, 2:48 PM |
l2k-Shadow | August 27, 2006, 3:08 PM | |
Undeadwarrior | Im well aware of those im asking how to to send them to the server it seems simply sending them as a string or in hex dont work. I send them and log it and it never seems to be correct so the server ignores it. Is there something else i have to do? | August 27, 2006, 3:34 PM |
rabbit | Send the protocol byte first. | August 27, 2006, 3:38 PM |
Undeadwarrior | i did sent 01 1e 1a 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff 12 3c 00 40 19 38 5c 25 c5 c6 01 40 41 d9 af ea c4 c6 01 e0 01 00 00 09 04 00 00 09 04 00 00 09 04 00 00 45 4e 55 00 31 00 55 53 41 00 55 6e 69 74 65 64 20 53 74 61 74 65 73 00 ff 06 14 00 36 38 58 49 4c 54 52 44 2a 00 00 00 00 00 00 00 and when logging packets with ethereal it seems that winsock took than and converted it to hex so i ended up sending the hex of the hex. Ive tried sending the string but theres multiples .'s in the string and those all get switched to the hex value of 2e even though thats not what they are suppose to be. Im inputting the correct data it seems as though im missing a step somewhere where i need to do some form of conversion on the data? | August 27, 2006, 3:48 PM |
l2k-Shadow | lol, man u just gotta learn what hex is and how internet works. in simple terms each one of those numbers represents a single character so when you see ff you would send Chr$(&HFF), also having a packet buffer helps GREATLY for forming DWORDS, WORDS, etc... also learning what those are would help as well. | August 27, 2006, 4:06 PM |
Undeadwarrior | I know what hex is and i know what a dword is ive been reversing games for some time now. Im just new to visual basic im assuming Chr$(&HFF) is how i need to send my data? the &h showing that the ff is hex and not just a text string correct? | August 27, 2006, 4:25 PM |
Yegg | [quote author=Undeadwarrior link=topic=15598.msg157261#msg157261 date=1156695909] I know what hex is and i know what a dword is ive been reversing games for some time now. Im just new to visual basic im assuming Chr$(&HFF) is how i need to send my data? the &h showing that the ff is hex and not just a text string correct? [/quote] If you have been "reversing games for some time now", you wouldn't be experiencing this problem regardless of language. Chr(&HFF) simply converts 0xFF into a character ("\xFF"). I don't know what the hell Chr$ is, I don't know the VB language. Anyways, hex are just numbers with a base of 16, nothing special about them really. Ethereal should show each packet in hex form, and the same packet in a string format so that you, as a human, can read it easier. When you do, Socket.Send(Chr(&HFF)), it should be the same as if you did Socket.Send("\xFF"). I don't know if VB6 allows you to even use "\xFF" the way I did, I don't see why it shouldn't. Anyways, ask someone for their VB PacketBuffer class and they can explain to you how it works, because apparently you don't know what one is. Creating a word, a double word, etc. should be no problem, VB6 probably makes that task pretty easy for you. By the way, in your data, right after the protocol byte, you should be sending 0xFF and then the length of the message. Look at the protocol formats for BNCS on BnetDocs.valhallalegends.com. It also looks like you're using the logon sequence for W2BN/DRTL/DSHR, you could be using the sequence that Starcraft uses. It will work for W2BN, I don't know if it will work for DRTL or DSHR. The sequence that Starcraft uses is much easier and there's less work to it. | August 28, 2006, 10:32 PM |
Undeadwarrior | Thats a D1 retail packet. And yes i knew hex was a base 16 numbering system but thanks anyway. I was logging D1 and using it to start with to avoid having to worry about cd key hashing until i can actually send the data properly. As for putting together a packet builder/parser im not worried about that at the moment what i have set up currently isnt even a bot really just connecting and sending the packet and listening for a a message back. Once i get it sending correctly ill put together a layout and actually build the program correctly. I had a busy day so i dont have time to piss with it tonight ill check into what you said tomorrow and hopefully get it figured out :) Thanks for the help. | August 29, 2006, 2:07 AM |