Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: nYko on April 01, 2004, 11:59 PM

Title: 0x7D
Post by: nYko on April 01, 2004, 11:59 PM
Can anyone explain how they handle 0x7D being recieved from Battle.net? (Visual Basic)

How do I extract all that data from the packet?

You can refer to BnetDocs for the packet's structure. I just don't know how to do that in VB.
Title: Re:0x7D
Post by: o.OV on April 02, 2004, 03:14 AM
Quote from: nYko on April 01, 2004, 11:59 PM
Can anyone explain how they handle 0x7D being recieved from Battle.net? (Visual Basic)

How do I extract all that data from the packet?

You can refer to BnetDocs for the packet's structure. I just don't know how to do that in VB.

Do you understand the structure?
What exactly is it that is stumping you?
Title: Re:0x7D
Post by: BaDDBLooD on April 02, 2004, 07:54 AM
Well you use one of these 3 functions

Mid
Right
Left

to pick whatever data you want out of the Void

And somtimes you have to Clng the string, or Change it to Hex, or Change the hex into string, or Clng and Change it to Hex
Title: Re:0x7D
Post by: MyndFyre on April 02, 2004, 09:44 AM
Quote from: nYko on April 01, 2004, 11:59 PM
Can anyone explain how they handle 0x7D being recieved from Battle.net? (Visual Basic)

How do I extract all that data from the packet?

You can refer to BnetDocs for the packet's structure. I just don't know how to do that in VB.

I remember Chr0nic having the same problem.  I wonder if this isn't just a new account for him.  :P
Title: Re:0x7D
Post by: BaDDBLooD on April 02, 2004, 01:10 PM
Quote from: Myndfyre on April 02, 2004, 09:44 AM
Quote from: nYko on April 01, 2004, 11:59 PM
Can anyone explain how they handle 0x7D being recieved from Battle.net? (Visual Basic)

How do I extract all that data from the packet?

You can refer to BnetDocs for the packet's structure. I just don't know how to do that in VB.

I remember Chr0nic having the same problem.  I wonder if this isn't just a new account for him.  :P

he's pretty sneaky :)
Title: Re:0x7D
Post by: Archangel on April 02, 2004, 03:31 PM
Quote from: nYko on April 01, 2004, 11:59 PM
Can anyone explain how they handle 0x7D being recieved from Battle.net? (Visual Basic)

How do I extract all that data from the packet?

You can refer to BnetDocs for the packet's structure. I just don't know how to do that in VB.

Here i go again, Bot Developmnet is not a good way to start learning VB.
But u use: Mid, Left, Right
Title: Re:0x7D
Post by: o.OV on April 02, 2004, 03:57 PM
Though I'm not sure what his problem is..
I think he is having problems determining the length of each set of data.
He hasn't clearly stated his problem yet.
Title: Re:0x7D
Post by: BaDDBLooD on April 02, 2004, 05:15 PM
you can use Len() to determine the length of the string

than you use mid / left / right along with the length of the string, to take information out of the packet

you may have to use CLng() or get a StrToHex, HexToStr functions as well
Title: Re:0x7D
Post by: nYko on April 02, 2004, 05:43 PM
I am not Chr0nic. I am new to Battle.net and Visual Basic. I doubt anyone here knows me.

What I don't understand is how I get the strings from the packet. Can someone explain or post sample code? Sample code is a good way to learn.

What does the CLing function do?

I know I sound "newbie" but we all have to learn somewhere.
Title: Re:0x7D
Post by: nYko on April 02, 2004, 05:44 PM
Quote from: o.OV on April 02, 2004, 03:57 PM
Though I'm not sure what his problem is..
I think he is having problems determining the length of each set of data.
He hasn't clearly stated his problem yet.

I stated that I don't know how to extract the data from the packet. That is my problem.
Title: Re:0x7D
Post by: o.OV on April 02, 2004, 06:52 PM
Quote from: nYko on April 02, 2004, 05:44 PM
Quote from: o.OV on April 02, 2004, 03:57 PM
Though I'm not sure what his problem is..
I think he is having problems determining the length of each set of data.
He hasn't clearly stated his problem yet.

I stated that I don't know how to extract the data from the packet. That is my problem.

That is too broad.
What.. you don't know how to extract any part of it even after looking on the documentation on bnetdocs?

Quote from: nYko on April 02, 2004, 05:43 PM
What I don't understand is how I get the strings from the packet.

That is more specific.

Quote
Can someone explain or post sample code? Sample code is a good way to learn.

Although I think sample source code is a great for learning, I think you are chr0nic's long lost brother.

Hi.

A string is null terminated for a reason and is always followed by X number of bytes before the start of the next set.
Title: Re:0x7D
Post by: MyndFyre on April 02, 2004, 07:31 PM
Quote from: o.OV on April 02, 2004, 06:52 PM
Quote from: nYko on April 02, 2004, 05:44 PM
Quote from: o.OV on April 02, 2004, 03:57 PM
Though I'm not sure what his problem is..
I think he is having problems determining the length of each set of data.
He hasn't clearly stated his problem yet.

I stated that I don't know how to extract the data from the packet. That is my problem.

That is too broad.
What.. you don't know how to extract any part of it even after looking on the documentation on bnetdocs?

Quote from: nYko on April 02, 2004, 05:43 PM
What I don't understand is how I get the strings from the packet.

That is more specific.

Quote
Can someone explain or post sample code? Sample code is a good way to learn.

Although I think sample source code is a great for learning, I think you are chr0nic's long lost brother.

Hi.

A string is null terminated for a reason and is always followed by X number of bytes before the start of the next set.

A null-terminator is a byte that has a value of 0.
Title: Re:0x7D
Post by: nYko on April 02, 2004, 08:47 PM
I have the feeling this is going nowhere.
Title: Re:0x7D
Post by: nYko on April 02, 2004, 08:48 PM
Spht's bot uses 0x7D. I wish I could get ahold of him.
Title: Re:0x7D
Post by: Archangel on April 02, 2004, 09:15 PM
S->C
Packet id: 0x7D - &H7D

Format:
(DWORD) Cookie
(BYTE) Number of users

For each user:
(STRING) Username
(BYTE) Clan rank
(WORD) Online status

Additional information:
None.

The Clan rank is a BYTE used to describe a W3 clan member's level.

0x04 - Chieftain (One per clan)
0x03 - Shaman (Up to five per clan)
0x02 - Grunt
0x01 - Peon
0x00 - Recruit (Peon icon; new members are this rank for seven days, and then promoted to Peon)
Title: Re:0x7D
Post by: MyndFyre on April 03, 2004, 12:31 AM
Ok...

You read through each byte in your packet...

The first four become a DWORD.  The next 1 is the number of users to expect.

For i = 0 To number of users to expect
 look through the packet to find the next 0.
 take all of the bytes from where you started to that location with the zero
 make those bytes all into one string.
 take the next byte, it's the rank
 the next two bytes become a WORD.
Next

Pseudocode.
Title: Re:0x7D
Post by: nYko on April 03, 2004, 01:09 AM
Thanks for the help. I really appriciate it. Can you tell me how that looks in VB code?
Title: Re:0x7D
Post by: Adron on April 03, 2004, 06:24 AM
Quote from: nYko on April 03, 2004, 01:09 AM
Thanks for the help. I really appriciate it. Can you tell me how that looks in VB code?

We can tell you that it looks good in VB code. You need to learn to translate pseudocode to VB code yourself some time, and you might as well do it now. If you need help with some specific translation, I invite you to post about that specific (short) translation you need on the VB forum.
Title: Re:0x7D
Post by: iago on April 03, 2004, 08:44 AM
Quote from: Adron on April 03, 2004, 06:24 AM
Quote from: nYko on April 03, 2004, 01:09 AM
Thanks for the help. I really appriciate it. Can you tell me how that looks in VB code?

We can tell you that it looks good in VB code. You need to learn to translate pseudocode to VB code yourself some time, and you might as well do it now. If you need help with some specific translation, I invite you to post about that specific (short) translation you need on the VB forum.

I agree with all of that, except that it probably looks bad in VB code :)
Title: Re:0x7D
Post by: SiMi on April 03, 2004, 12:26 PM
Quote from: nYko on April 03, 2004, 01:09 AM
Thanks for the help. I really appriciate it. Can you tell me how that looks in VB code?
Yep, Its chr0nic all right. Recently that guy has been trying to make his sentences complete by adding periods and all that other stuff (commas, question marks, etc). Did I miss something? Did chr0nic get banned?
Title: Re:0x7D
Post by: ChR0NiC on April 03, 2004, 12:49 PM
Quote from: nYko on April 01, 2004, 11:59 PM
Can anyone explain how they handle 0x7D being recieved from Battle.net? (Visual Basic)

How do I extract all that data from the packet?

You can refer to BnetDocs for the packet's structure. I just don't know how to do that in VB.

Quote from: Myndfyre on April 02, 2004, 09:44 AM
I remember Chr0nic having the same problem.  I wonder if this isn't just a new account for him.  :P

I am happy to report I sucessfully parsed this packet without help from stuck up programmers like yourself MyndFire


Edit:

Quote from: Simi on April 03, 2004, 12:26 PM
Yep, Its chr0nic all right. Recently that guy has been trying to make his sentences complete by adding periods and all that other stuff (commas, question marks, etc). Did I miss something? Did chr0nic get banned?

Um.....it's not me you retard. Ask an admin to check the IP's or something.

If anything, I think Simi should be banned from these forums, as he only posts to flame people.

Edit2:

Quote from: nYko on April 03, 2004, 01:09 AM
Thanks for the help. I really appriciate it. Can you tell me how that looks in VB code?

If you want this code written in VB for you, I'm sorry to say, perhaps you shouldn't be writing bots. As this was quite a fun packet, and it took me only around 30 minutes. So if you really wrote your own bot personally, this shouldn't be very hard.
Title: Re:0x7D
Post by: nYko on April 03, 2004, 04:25 PM
I didn't write my own bot. I am simply adding onto a friends project.
Title: Re:0x7D
Post by: MyndFyre on April 03, 2004, 07:06 PM
Quote from: ChR0NiC on April 03, 2004, 12:49 PM

Quote from: Myndfyre on April 02, 2004, 09:44 AM
I remember Chr0nic having the same problem.  I wonder if this isn't just a new account for him.  :P

I am happy to report I sucessfully parsed this packet without help from stuck up programmers like yourself MyndFire


Excuse me?  I distinctly remember spending over an hour with you on AIM trying to get you to understand what a null character was and how to find where the strings began and ended.  Don't give me that crap.

Secondarily, what I said wasn't meant as a dig at you.  It wouldn't be the first time someone registerred a new account to get help because people were sick of helping that specific person.  Saying "I remember Chr0nic had this problem" was just me thinking that I remembered you having this problem, nothing more.  So get off me Mr. Ungrateful!
Title: Re:0x7D
Post by: ChR0NiC on April 03, 2004, 07:12 PM
Quote from: Myndfyre on April 03, 2004, 07:06 PM
Excuse me?  I distinctly remember spending over an hour with you on AIM trying to get you to understand what a null character was and how to find where the strings began and ended.  Don't give me that crap.

Secondarily, what I said wasn't meant as a dig at you.  It wouldn't be the first time someone registerred a new account to get help because people were sick of helping that specific person.  Saying "I remember Chr0nic had this problem" was just me thinking that I remembered you having this problem, nothing more.  So get off me Mr. Ungrateful!

Stealth actually taught me what a null character what around 3 months ago, and I don't recall the other stuff you claim to have helped me with. Plus, you were the one who first accused me of creating the second account, followed up by BaDDBLooD and Simi.

Edit: Sorry about the disrespect but I am quite offended that people would accuse me of doing such a thing.
Title: Re:0x7D
Post by: nYko on April 04, 2004, 09:16 PM
MydeFire, maybe you could help me parse this packet over AIM?

Please IM me. My screen name is: ex1led0ne

Thanks a lot.
Title: Re:0x7D
Post by: Soul Taker on April 05, 2004, 05:30 AM
Sometimes when I'm reading the BotDev forum, I get really confused and think to myself "How did I end up in the stupid people arguing about stupid things forum?"...
Title: Re:0x7D
Post by: nYko on April 06, 2004, 05:16 AM
Quote from: Soul Taker on April 05, 2004, 05:30 AM
Sometimes when I'm reading the BotDev forum, I get really confused and think to myself "How did I end up in the stupid people arguing about stupid things forum?"...

Oh, you're cool. I'm just stupid because I am asking for help. Wow, you are superior to me because you were born knowing everything about Battle.net's 0x7D packet. I shouldn't have asked for help. My bad.
Title: Re:0x7D
Post by: Adron on April 06, 2004, 10:28 AM
Quote from: nYko on April 06, 2004, 05:16 AM
Oh, you're cool. I'm just stupid because I am asking for help. Wow, you are superior to me because you were born knowing everything about Battle.net's 0x7D packet. I shouldn't have asked for help. My bad.

Yes, obviously! We're all cool, and you're the only one who is stupid.

Just look at you, you started this topic asking for help!. You may observe that we all, every single one of us, fully understand the 0x7D packet, and that we have done so ever since opening our eyes for the first time. Yes, not having such basic knowledge, you must be utterly stupid.

You may now thank us for sharing our divine wisdom with a poor lost soul as yourself, and then crawl back under whatever rock you were hiding under before. Having you sitting here begging for crumbs from our feast on knowledge leaves a stain on the surface of our perfect world.

Shoo!
Title: Re:0x7D
Post by: Soul Taker on April 06, 2004, 03:19 PM
Quote from: nYko on April 06, 2004, 05:16 AM
Quote from: Soul Taker on April 05, 2004, 05:30 AM
Sometimes when I'm reading the BotDev forum, I get really confused and think to myself "How did I end up in the stupid people arguing about stupid things forum?"...

Oh, you're cool. I'm just stupid because I am asking for help. Wow, you are superior to me because you were born knowing everything about Battle.net's 0x7D packet. I shouldn't have asked for help. My bad.
Maybe you should read what I said again, and keep in mind that the mentioned forum is for housing arguments.
Title: Re:0x7D
Post by: Newby on April 06, 2004, 04:06 PM
Quote from: nYko on April 06, 2004, 05:16 AM
Quote from: Soul Taker on April 05, 2004, 05:30 AM
Sometimes when I'm reading the BotDev forum, I get really confused and think to myself "How did I end up in the stupid people arguing about stupid things forum?"...

Oh, you're cool. I'm just stupid because I am asking for help. Wow, you are superior to me because you were born knowing everything about Battle.net's 0x7D packet. I shouldn't have asked for help. My bad.
I don't think he was talking about you. I think he was talking about Chr0nic and Myndfire.
Title: Re:0x7D
Post by: ChR0NiC on April 06, 2004, 10:20 PM
Quote from: nYko on April 06, 2004, 05:16 AM
Oh, you're cool. I'm just stupid because I am asking for help. Wow, you are superior to me because you were born knowing everything about Battle.net's 0x7D packet. I shouldn't have asked for help. My bad.

Quote from: Adron on April 06, 2004, 10:28 AM
Yes, obviously! We're all cool, and you're the only one who is stupid.

Just look at you, you started this topic asking for help!. You may observe that we all, every single one of us, fully understand the 0x7D packet, and that we have done so ever since opening our eyes for the first time. Yes, not having such basic knowledge, you must be utterly stupid.

You may now thank us for sharing our divine wisdom with a poor lost soul as yourself, and then crawl back under whatever rock you were hiding under before. Having you sitting here begging for crumbs from our feast on knowledge leaves a stain on the surface of our perfect world.

Shoo!


I couldn't have said it better myself, BRAVO ADRON !!! BRAVO !!