Valhalla Legends Forums Archive | Battle.net Bot Development | My First Binary Bot

AuthorMessageTime
JoeTheOdd
About a week ago, I got pissed because CSB uses the BNLS server that was down, so I stopped using it and decided to write my own Binary Bot. I feel that I'm doing quite poorly at it, but some say I'm doin good, so I'm still working on it. So far, I can send null packets (duh), log on to a JBLS server (like BNLS, made by The-FooL), and Request verbytes.

So, since I know a lot of people use CSB, but might want to try making a binary bot, have at some source code!

Verbyte Request for BNLS[code]
pbuffer.InsertDWORD &H1
pbuffer.SendBNLSPacket &H10
WriteToLog "[BNLS] VerByte Requested (0x10)"
AddChat vbGreen, "[BNLS] Version Byte Requested (0x10)"[/code]

0x00 (Null) for JBLS[code]
pbuffer.SendJBLSPacket "&H0"
AddChat vbGreen, "[JBLS] Sent 0x00"
WriteToLog "[JBLS] Sent 0x00 (JBLS_NULL)"[/code]

And last but not least, My Wonderful BNLS/JBLS parser:[code]
Private Sub ParseJBLS(ByVal Data As String)
Select Case Asc(Mid(Data, 3, 1))
    Case &H10
        verbyte = GetDWORD(Mid(Data, 8, 4))
        verbyte = Replace(verbyte, Chr(13), vbNullString)
        Dim strVerbyte As String
        strVerbyte = verbyte
        AddChat vbGreen, "[JBLS] Verbyte: " & DecToHex(strVerbyte)
    Case Else
            AddChat vbCyan, "[JBLS] Data Arrival!"
            AddChat vbCyan, strJblsData
End Select
End Sub[/code]
Yup. It parses the whole 0x10 Packet.

Well, thats all I really have worth posting here. For the verbytes, though, if anyone has a DecToHex Sub so I can get verbytes like C9 and 0A and stuff, please post that here.


EDIT: I FINALLY stopped stubbing my toe on that fzcking 0x50 packet. Wee!
EDIT2: Used code blocks, and updated my ParseBNLS sub.
October 29, 2004, 8:11 AM
EviL_MarinE
Use [ / code ] for your code plz.

Bot sounds good, keep it up :)
October 29, 2004, 9:13 AM
LoRd
[me="LoRd[nK]"]finds it odd that your connection's out buffer is referred to as "JBLS" while your connection's in buffer is referred to as "BNLS"[/me]

Even though the small amount of code you posted has little to no use to anyone other than yourself, it may help to include all of the functions your code requires to run, rather than just a select few.

[quote]For the verbytes, though, if anyone has a DecToHex Sub so I can get verbytes like C9 and 0A and stuff, please post that here.[/quote]

[code]
Dim sHex As String * 2

sHex = Hex(201)
[/code]
October 29, 2004, 10:35 AM
iago
[quote author=LoRd[nK] link=topic=9353.msg86502#msg86502 date=1099046152]
[me="LoRd[nK]"]
[code]
Dim sHex As String * 2

sHex = Hex(201)
[/code]
[/quote]

Wouldn't there be a danger with overflowing that if it was used for arbitrary data? Or is buffer overflow not an issue in vb (thus creating MORE bad habits in vb programmers)?

Incidentally, BNLS and JBLS are interchangable, so you can technically use CSB with JBLS to log in.  If you can't change the BNLS server for CSB easily, you can probably do it in your hosts file.
October 29, 2004, 1:28 PM
Skywing
[quote author=iago link=topic=9353.msg86511#msg86511 date=1099056491]
[quote author=LoRd[nK] link=topic=9353.msg86502#msg86502 date=1099046152]
[me="LoRd[nK]"]
[code]
Dim sHex As String * 2

sHex = Hex(201)
[/code]
[/quote]

Wouldn't there be a danger with overflowing that if it was used for arbitrary data? Or is buffer overflow not an issue in vb (thus creating MORE bad habits in vb programmers)?

Incidentally, BNLS and JBLS are interchangable, so you can technically use CSB with JBLS to log in.  If you can't change the BNLS server for CSB easily, you can probably do it in your hosts file.
[/quote]
Not quite, JBLS doesn't implement the full protocol.  For instance, you might have trouble getting EternalChat to log on to War3 using it, because (IIRC) JBLS doesn't support checking server password proofs.  AFAIK, it doesn't support password change, either.
October 29, 2004, 2:45 PM
Quarantine
Yes, asked Spht why It wouldnt logon with SphtBot and he said it was something with JBLS .  Anyways Joe, Good job. Im glad to see your working so hard.
October 29, 2004, 5:10 PM
LoRd
[quote]Wouldn't there be a danger with overflowing that if it was used for arbitrary data?[/quote]

No.  It would just trunicate the returned value, but since, in this case, it'll only be used for byte conversions, so it shouldn't be a problem.
October 29, 2004, 6:00 PM
JoeTheOdd
[quote][12:47:49 PM] [JBLS] Connecting
[12:47:49 PM] [JBLS] Connected!
[12:47:50 PM] [JBLS] Version Byte Requested (0x10)
[12:47:50 PM] [JBLS] Verbyte: C9[/quote]

*hugs lord, realizes what he just did, and steps back*

Thanks LoRd

EDIT: The reason it says the JBLS verbyte came from BNLS, is because my ParseJBLS sub is a copy and pasted version of my ParseBNLS sub and I forgot to change the label for it. Its fixed now.

EDIT2: As for Sphtbot, JBLS doesn't handle 0x0F properly, because, quite obviosly, FooL doesn't have the BNLS accound passwords :P

EDIT3: I tweaked the DecToHex thing a bit and ended up with..[code]Public Function DecToHex(Dec As String) As String
Dim sHex As String * 2
sHex = Hex(Dec)
DecToHex = sHex
End Function[/code]
October 29, 2004, 7:48 PM
Minux
[quote author=JoeTheOdd link=topic=9353.msg86535#msg86535 date=1099079324]

[code]
Public Function DecToHex(Dec As String) As String
Dim sHex As String * 2
sHex = Hex(Dec)
DecToHex = sHex
End Function
[/code]

EDIT3: I tweaked the DecToHex thing a bit and ended up with..
[/quote]

Forgive me for being out of line, but how is that tweaked?

[u]Lord's code[/u]
[quote author=LoRd[nK] link=topic=9353.msg86502#msg86502 date=1099046152]
[code]
Dim sHex As String * 2

sHex = Hex(201)
[/code]
[/quote]

All you did was make it into a function. So you constructed it into a routine...you did not tweak it.
October 29, 2004, 8:21 PM
JoeTheOdd
By tweaked, I meant made it into a function :P
October 29, 2004, 8:29 PM
iago
[quote author=Skywing link=topic=9353.msg86514#msg86514 date=1099061123]
[quote author=iago link=topic=9353.msg86511#msg86511 date=1099056491]
[quote author=LoRd[nK] link=topic=9353.msg86502#msg86502 date=1099046152]
[me="LoRd[nK]"]
[code]
Dim sHex As String * 2

sHex = Hex(201)
[/code]
[/quote]

Wouldn't there be a danger with overflowing that if it was used for arbitrary data? Or is buffer overflow not an issue in vb (thus creating MORE bad habits in vb programmers)?

Incidentally, BNLS and JBLS are interchangable, so you can technically use CSB with JBLS to log in.  If you can't change the BNLS server for CSB easily, you can probably do it in your hosts file.
[/quote]
Not quite, JBLS doesn't implement the full protocol. For instance, you might have trouble getting EternalChat to log on to War3 using it, because (IIRC) JBLS doesn't support checking server password proofs. AFAIK, it doesn't support password change, either.
[/quote]

I've never actually looked at it at all.  But I'm not surprised it doesn't do password change, since he's using my login code and I never wrote a password change myself.  In fact, same with checking proofs.
October 29, 2004, 10:48 PM
LoRd
[quote]EDIT2: As for Sphtbot, JBLS doesn't handle 0x0F properly, because, quite obviosly, FooL doesn't have the BNLS accound passwords Tongue[/quote]
All it'd have to do is spit out a random encryption key and return the sucess value when the client replied to it with the checksum...
October 30, 2004, 12:55 AM
Skywing
[quote author=iago link=topic=9353.msg86556#msg86556 date=1099090131]
[quote author=Skywing link=topic=9353.msg86514#msg86514 date=1099061123]
[quote author=iago link=topic=9353.msg86511#msg86511 date=1099056491]
[quote author=LoRd[nK] link=topic=9353.msg86502#msg86502 date=1099046152]
[me="LoRd[nK]"]
[code]
Dim sHex As String * 2

sHex = Hex(201)
[/code]
[/quote]

Wouldn't there be a danger with overflowing that if it was used for arbitrary data? Or is buffer overflow not an issue in vb (thus creating MORE bad habits in vb programmers)?

Incidentally, BNLS and JBLS are interchangable, so you can technically use CSB with JBLS to log in.  If you can't change the BNLS server for CSB easily, you can probably do it in your hosts file.
[/quote]
Not quite, JBLS doesn't implement the full protocol. For instance, you might have trouble getting EternalChat to log on to War3 using it, because (IIRC) JBLS doesn't support checking server password proofs. AFAIK, it doesn't support password change, either.
[/quote]

I've never actually looked at it at all.  But I'm not surprised it doesn't do password change, since he's using my login code and I never wrote a password change myself.  In fact, same with checking proofs.
[/quote]
Provided he understands how the system works, it shouldn't be too difficult to implement those...
October 30, 2004, 2:24 AM
The-FooL
[quote author=LoRd[nK] link=topic=9353.msg86564#msg86564 date=1099097715]
[quote]EDIT2: As for Sphtbot, JBLS doesn't handle 0x0F properly, because, quite obviosly, FooL doesn't have the BNLS accound passwords Tongue[/quote]
All it'd have to do is spit out a random encryption key and return the sucess value when the client replied to it with the checksum...
[/quote]

It actually does support the BNLS account login packets, but accepts all logins as anonymous.  You *could* modify the source and have it reply with the password verified response code.

And as Iago said, I used his Checkrevision and SRP Classes, so there is no change password support.
October 30, 2004, 2:31 AM
JoeTheOdd
Well, I don't mean to be a topic bumper, but..

*BUMP*

Work on this project has been re-started. I'm working on a JSTR client because 0x51 was a stumper. My BNLS packet work with the JSTR client should be sufficient to get past 0x51, but, meh.
January 30, 2005, 3:00 AM
Zakath
Good luck getting JSTR working using 0x51.
January 30, 2005, 11:34 AM
JoeTheOdd
You're not the only one who mis-understood me. By saying that I'm trying to get past 0x51, I meant after JSTR I'm doing STAR again. I've seen the BnetDocs Logon Sequences page, and I have no intention of using JSTR with SID_AUTH_*.
January 30, 2005, 4:02 PM
Zakath
Ah. Personally, I've never even bothered to write code to deal with non-SID_AUTH_* logins. DRTL and JSTR aren't of enough value to me for me to find it desirable to write more code to deal with another kind of logon.
January 31, 2005, 12:04 AM
KkBlazekK
They also can't go into private channels which makes them even more useless.
January 31, 2005, 12:45 AM
JoeTheOdd
Yeah, thats true. However, if you're on TestBNCS, they can do some back assward tricks, including, but not limited to, joining private channels.

Back to normal BNET though: JSTR eats a SC key too, making it even MORE annoying.
January 31, 2005, 2:38 AM
OnlyMeat
[quote author=Zakath link=topic=9353.msg97506#msg97506 date=1107129844]
Ah. Personally, I've never even bothered to write code to deal with non-SID_AUTH_* logins. DRTL and JSTR aren't of enough value to me for me to find it desirable to write more code to deal with another kind of logon.
[/quote]

DRTL login is incredibly simple as it requires no cdkey related login packets.

I can load 8 DRTL bots on a single ip without any cdkeys quite funny really :)
January 31, 2005, 7:55 AM
tA-Kane
It's also quite useless.
February 1, 2005, 11:07 AM
KkBlazekK
I bet there isn't a lot of people hosting the hash files for them either..
February 1, 2005, 4:56 PM
HdxBmx27
Hay, if ur gona be like me and support all login types, DRTL is one of them, I have the hashes, and if u want any help ask me.  But seriously, loading bots is worthless...
~-~(HDX)~-~
February 1, 2005, 7:27 PM
Zakath
You could also do it the old fashioned way and just install the game...

Or are all you people too young to have played Diablo?
February 1, 2005, 10:18 PM
shout
I used to love Diablo.  But then dumb "hackers" (cough) ruined the game.
February 1, 2005, 11:04 PM
HdxBmx27
[quote author=Zakath link=topic=9353.msg97810#msg97810 date=1107296323]
You could also do it the old fashioned way and just install the game...

Or are all you people too young to have played Diablo?
[/quote]
D1 is the only acull client I have installed, Theres nuthing like the classics. And yes "hackers" fuck it up the *ss royaly, its not worth playing Online anymore unless u get private servers. But its still a good Single player game, specilly if u know how to make mods for it ;)
~-~(HDX)~-~
February 2, 2005, 12:09 AM
Myndfyr
[quote author=HdxBmx27 link=topic=9353.msg97832#msg97832 date=1107302952]
[quote author=Zakath link=topic=9353.msg97810#msg97810 date=1107296323]
You could also do it the old fashioned way and just install the game...

Or are all you people too young to have played Diablo?
[/quote]
D1 is the only acull client I have installed, Theres nuthing like the classics. And yes "hackers" fuck it up the *ss royaly, its not worth playing Online anymore unless u get private servers. But its still a good Single player game, specilly if u know how to make mods for it ;)
~-~(HDX)~-~
[/quote]

Out of curiosity, why would you censor "ass" but not "fuck"?
February 2, 2005, 2:01 AM
HdxBmx27
I said fuck 0.o whops, do u ppl care if i swear?
Lots of ppl do, I try to catch it but w/e
~-~(HDX)~-~
February 2, 2005, 4:16 AM
UserLoser.
[quote author=HdxBmx27 link=topic=9353.msg97874#msg97874 date=1107317789]
I said fuck 0.o whops, do u ppl care if i swear?
Lots of ppl do, I try to catch it but w/e
~-~(HDX)~-~
[/quote]

I don't think so.  Most of us are over 12 years in age, although a bunch of people surely do not act like it
February 2, 2005, 4:19 AM
shout
And plus, we happen to be on the internet, so its not like your talking to someone face to face.
February 2, 2005, 3:49 PM
KkBlazekK
I swear at hdx all the time on the phone; does that count as face to face?
February 2, 2005, 8:34 PM
shout
No.
February 2, 2005, 9:59 PM
JoeTheOdd
I suppose I am too young to have played Diablo I, but after I played WarCraft III, I bought a copy of D1 at a garage sale for four bucks. It included the strategy guide, so, meh.

Also, DRTL is not exactly worthless. Now that someone mentioned loading 8 D1 bots.. its more than you can load with CHAT. Why would anyone care? If your users don't mind downloading additional hashes for their bot, you can load up 3 DRTL connections in the background along with your STAR or whatever bot, so you can use the DRTL's for a user monitor feature. This wouldn't be that big of an ass to maintain either, because the hashes are.. 1.2MB?.. and there is no way in hell its ever going to be patched again.
February 2, 2005, 10:06 PM
LoRd
[quote]you can load up 3 DRTL connections in the background along with your STAR[/quote]

Why not just load those 3 additional clients as spawns?
February 2, 2005, 10:41 PM
JoeTheOdd
I guess that works too. DRTL would be an easier logon sequence to use, wouldn't it? With spawn, I think you're only allowed to play games with the one who shares your key, so you would need to send your key, AFAIK.
February 2, 2005, 10:52 PM
HdxBmx27
Yes Spawns are olny allowed to play with others on there cdkey, BUT why would u make a bot to play games, spawn shats perfectly fine.
But Just add DRTl cuz its something to do, adds more flexibility for your bot.
End-Users Like flexibility.
~-~(HDX)~-~
February 3, 2005, 12:06 AM
Kp
[quote author=JoeTheOdd link=topic=9353.msg97924#msg97924 date=1107381973]It included the strategy guide, so, meh.[/quote]

Trash that "strategy guide" at once.  It's based off a pre-release and is often wildly inaccurate.  You're quite likely to get your character killed if you heed its advice.
February 3, 2005, 3:15 AM
JoeTheOdd
You're likely to get killed if you don't use hax.

HdxBmx27: Doesn't that mean we need to send the CD-Key? More packet work we need to do if we don't wanna use DRTL.

Back on the subject of my bot, I'm about half way done with the JSTR logon.
February 4, 2005, 1:00 PM
Kp
[quote author=JoeTheOdd link=topic=9353.msg98184#msg98184 date=1107522035]You're likely to get killed if you don't use hax.[/quote]

If you follow that strategy guide from Prima, yes, you are.  However, if you have a clue what you're doing, Diablo is an extremely easy game to play legit.  Consider such cases as Percy(BNM), the blind lighthouse, and the numerous 3@30 postings. :)
February 4, 2005, 5:46 PM
UserLoser.
[quote author=JoeTheOdd link=topic=9353.msg97937#msg97937 date=1107384754]
I guess that works too. DRTL would be an easier logon sequence to use, wouldn't it? With spawn, I think you're only allowed to play games with the one who shares your key, so you would need to send your key, AFAIK.
[/quote]

You can play Starcraft (and I'm sure Diablo I) games without even being on Battle.net.
February 5, 2005, 6:34 AM

Search