Author | Message | Time |
---|---|---|
Toodles | Allo, I'm obviously new here thus this being my first post here. I have been reading around on the forums for some time now and have posted a bunch on other forums such as madzbots and stealth. I am trying to make a little bot yet I'm coming across a few problems. I am progging in C++ and I know how to use winsock2 and I am not having a problem with program anything really... I connected to bnet i think but that again eveyone is using bnls or local "hashing" to connect for somereason. Can't you just connect to it with winsock dirrectly? So if anyone can tell me how to connect to bnet, hopefully with out using bnls thad be very grateful. I am pretty sure once connected and everything I could send packets to create text and shit with out using addchat and all that stuff. Thx | June 11, 2004, 8:09 PM |
Twix | You need to use hashing or bnls to connect to b.net | June 11, 2004, 8:15 PM |
BinaryzL | [quote author=Toodles link=board=17;threadid=7202;start=0#msg64700 date=1086984563] Allo, I'm obviously new here thus this being my first post here. I have been reading around on the forums for some time now and have posted a bunch on other forums such as madzbots and stealth. I am trying to make a little bot yet I'm coming across a few problems. I am progging in C++ and I know how to use winsock2 and I am not having a problem with program anything really... I connected to bnet i think but that again eveyone is using bnls or local "hashing" to connect for somereason. Can't you just connect to it with winsock dirrectly? So if anyone can tell me how to connect to bnet, hopefully with out using bnls thad be very grateful. I am pretty sure once connected and everything I could send packets to create text and shit with out using addchat and all that stuff. Thx [/quote] They do use winsock 2.0 but BNLS and local "hashing" are methods of logging onto battle.net/using battle.net. Someone else can probably post a better explanation. | June 11, 2004, 8:49 PM |
Adron | You use winsock to connect to it. 1.1, 2.0, either will work. Then you need to know what to send to identify yourself, to talk, to whisper, to join games, etc. Depending on which of the available protocols you choose to use, you may have to use what is called "hashing" or BNLS. "Hashing" is just the procedure for producing some of the information you are required to send to battle.net at a particular place in the login procedure using a certain protocol. And if you don't want to do "hashing" yourself, you can ask BNLS to do it for you. Oh, you asked about how to connect to b.net too. You make a tcp connection to a b.net server on port 6112. That's it, then you're connected. Perhaps you can then find a way to send packets to create text and shit without hashing. One idea would be to try sending a character with the ascii value of 3. You can find b.net server ips by resolving things like useast.battle.net, uswest.battle.net, asia.battle.net, europe.battle.net, ... | June 11, 2004, 9:27 PM |
Toodles | Yea I have a clean connection to battle net i believe using the port: 6112 and server: 66.132.130.34 I had this a while ago, so if I'm connected to bnet... how would i now use hashing... I'm guessing I there are just general subs for the different things needed for bnet in storm.dll... I just don't know how to look at those subs and don't know what to send. | June 11, 2004, 10:38 PM |
Twix | Just for a sidenote if you are trying to make wc3 bot u have to use bnls | June 11, 2004, 11:18 PM |
hismajesty | [quote author=Twix link=board=17;threadid=7202;start=0#msg64702 date=1086984930] You need to use hashing or bnls to connect to b.net [/quote] No you don't. [quote]Just for a sidenote if you are trying to make wc3 bot u have to use bnls[/quote] No you don't. | June 11, 2004, 11:30 PM |
Adron | [quote author=hismajesty[yL] link=board=17;threadid=7202;start=0#msg64717 date=1086996647] [quote author=Twix link=board=17;threadid=7202;start=0#msg64702 date=1086984930] You need to use hashing or bnls to connect to b.net [/quote] No you don't. [quote]Just for a sidenote if you are trying to make wc3 bot u have to use bnls[/quote] No you don't. [/quote] I already said that! :P | June 12, 2004, 12:02 AM |
Adron | [quote author=Toodles link=board=17;threadid=7202;start=0#msg64713 date=1086993492] Yea I have a clean connection to battle net i believe using the port: 6112 and server: 66.132.130.34 I had this a while ago, so if I'm connected to bnet... how would i now use hashing... I'm guessing I there are just general subs for the different things needed for bnet in storm.dll... I just don't know how to look at those subs and don't know what to send. [/quote] If you try the idea I mentioned previously, you don't have to use hashing. Other than that, it's a huge topic. You should read up on this by checking this forum and bnetdocs. Familiarize yourself with "packets". You can find an explanation of packets in one of the most recent threads in the AIM bot forum. There aren't general subs for the b.net things in storm.dll. They are in battle.snp. To look at them, you could use a tool such as w32dasm or IDA. But I don't think trying to use them would be a good idea. What most do is either use reverse-engineered and rewritten versions in their native language, called "local hashing", or use the BNLS interface to get the right processing performed for you. You should definitely log b.net connections with a packet sniffer / network tracer / packet capture application / whatever you like to call it. Something that allows you to check what data a real client sends ;) | June 12, 2004, 12:10 AM |
Eli_1 | [quote] Familiarize yourself with "packets". You can find an explanation of packets in one of the most recent threads in the AIM bot forum.[/quote] https://davnit.net/bnet/vL/phpbbs/index.php?board=20;action=display;threadid=7100 [quote] A "packet" can be used in many places. A packet as used here just means "a group of data". In a way, you are already using packets to communicate with battle.net for getting those statistics. Your packets are delimited by "\n", line-feeds. They are more commonly called "lines". There's nothing magical about "packets". What's different from what you're used to is that the packets here in the binary world contain data that can't be read as a sequence of characters, and that they may seem harder to separate. In battle.net, for a binary connection, a packet could be any length between 4 and 65535 bytes. You don't find the end of a packet by looking for a line-feed, but by reading the start of the packet, looking at a value there that tells you how long the packet will be. If you print out the contents of the incoming data from the server, a stream of textual, line-feed delimited data will be easy to read. The corresponding binary packets with a length field instead of a separator character, and using binary characters instead of text, will be harder to read. In an application, I personally think that packets with a length field at the start, and data that doesn't have to be translated into binary are easier to parse. If "translated into binary" doesn't make sense to you, you're probably a high level programmer. In a language like C++, you're very aware of the difference between char textvalue[] = "3.14159"; and float floatvalue = 3.14159; A textual "packet" (line) will contain the first representation, a string. A binary packet will contain the second representation, an actual number as the computer would write it. I hope this will answer your first question about what packets are. For the second one, how to send and receive them, it depends entirely on what language you will be using to do it. In c++, you'd probably use the "send" and "recv" functions to send and receive data from the server. You'd typically receive it into a char[] buffer, and then parse out packets from that depending on how the packets are delimited in your particular protocol. For your third question, I don't know exactly how it works in AIM. I've never programmed for AIM. I think you'll be able to find definitions for what packets are in AIM in other posts on this forum. Read those. Knowing that "packet" isn't anything magical, you should be able to make sense of the specifications you find there. [/quote] | June 12, 2004, 12:17 AM |
Toodles | Yes i know exactly what packets are and such. I have looked through bnet docs multiple times. When you connect to bent do they send you certain packets instantly which u have to respawn to? Thats where I'm stuck. I did read the topic in AIM bots about packets, etc. I'm just wondering what to send send to login and stuff in order to get into a channel. | June 12, 2004, 2:56 AM |
BaDDBLooD | You first tell bnet what Protocol you want to use i think they're: Chat FTP Game I think game = Chr(1) After that you send packet 0x50 to Bnet Bnet responds by sending 0x50 and 0x25 Back to you... that should get you started nicely | June 12, 2004, 2:58 AM |
GoSuGaMING | [quote author=Toodles link=board=17;threadid=7202;start=0#msg64751 date=1087009014] Yes i know exactly what packets are and such. I have looked through bnet docs multiple times. When you connect to bent do they send you certain packets instantly which u have to respawn to? Thats where I'm stuck. I did read the topic in AIM bots about packets, etc. I'm just wondering what to send send to login and stuff in order to get into a channel. [/quote] maby you should try packetlogging a bot... you dont just send one packet and your connected to battle.net or as you put it "bent" Bnet responds or "respawns" to only what you send it. | June 12, 2004, 3:00 AM |
Eli_1 | [quote author=GoSuGaMING link=board=17;threadid=7202;start=0#msg64754 date=1087009208] [quote author=Toodles link=board=17;threadid=7202;start=0#msg64751 date=1087009014] Yes i know exactly what packets are and such. I have looked through bnet docs multiple times. When you connect to bent do they send you certain packets instantly which u have to respawn to? Thats where I'm stuck. I did read the topic in AIM bots about packets, etc. I'm just wondering what to send send to login and stuff in order to get into a channel. [/quote] maby you should try packetlogging a bot... you dont just send one packet and your connected to battle.net or as you put it "bent" Bnet responds or "respawns" to only what you send it. [/quote] You're connected to b.net without doing much of anything, it's the logging in that requires packets to be sent. | June 12, 2004, 3:34 AM |
Toodles | you know your kool when you point out people typos but yea respawn was a reallly bad typo. Yes, exactly Eli_1, I'm stuck at the logging in part. And BaDDBLooD thx a lot, thats what i was looking for. ;D | June 12, 2004, 4:36 AM |
BaDDBLooD | [quote author=Toodles link=board=17;threadid=7202;start=0#msg64774 date=1087015007] you know your kool when you point out people typos but yea respawn was a reallly bad typo. Yes, exactly Eli_1, I'm stuck at the logging in part. And BaDDBLooD thx a lot, thats what i was looking for. ;D [/quote] No Problemo. | June 12, 2004, 1:01 PM |