Valhalla Legends Forums Archive | Battle.net Bot Development | bnetauth.dll

AuthorMessageTime
botmaster
anyone else using this for hashing? if so is it making your bot crash?
February 4, 2004, 3:26 PM
o.OV
[quote author=botmaster link=board=17;threadid=5078;start=0#msg42548 date=1075908379]
anyone else using this for hashing? if so is it making your bot crash?
[/quote]

I have used bnetauth before and no. It doesn't cause my bot to crash.
February 4, 2004, 6:10 PM
Dyndrilliac
I would assume this is faulty code, as I use this DLL and have no problems.
February 4, 2004, 8:02 PM
botmaster
I have an error 5 that I cant track down yet. So i started to debug it ran smart check on it and this is what i got.

[code]
EXCEPTION(2nd Chance) Exception: Access Violation
code: C0000005 addr:0468DA46
bnetauth.dll-0000DA46 (04680000)
invalid write to 107B6C00
EAX:107B6C00 EBX:0012E85B ECX:0012EBF8
EDX:67641AEB ESI:0468DA2F EDI:00033058
ESP:0468DA17 EBP:0468DBD6 EIP:0468DA46
EFLAGS:00000246
CS:001B DS:0023 ES:0023
SS:0023 FS:003B GS:0000
Stack dump
00033058:0468DA2F:0468DBD6:0468DA37
Call stack
bnetauth.dll!0000DA46
Exception: Access Violation
EXIT_THREAD
EXIT_THREAD
EXIT_THREAD
EXIT_THREAD
EXIT_THREAD
EXIT_PROCESS
[/code]

anyone know why it would exit?
February 4, 2004, 8:47 PM
Skywing
Perhaps you passed invalid input to it?
February 5, 2004, 6:14 AM
botmaster
if it was invalid would it stll connect and login?
February 5, 2004, 2:47 PM
Skywing
[quote author=botmaster link=board=17;threadid=5078;start=0#msg42653 date=1075992463]
if it was invalid would it stll connect and login?
[/quote]Possibly. You could be passing some input that causes heap corruption, leading to later failures, for instance.
February 5, 2004, 2:54 PM
botmaster
alright ill look into it thanks.
February 5, 2004, 7:01 PM
Arthas
yes, I encountered problems with some D2 realm packets in my version. Thats probably just because of 1.10 ;)
February 6, 2004, 6:00 AM
Maddox
[quote author=Arthas link=board=17;threadid=5078;start=0#msg42746 date=1076047225]
yes, I encountered problems with some D2 realm packets in my version. Thats probably just because of 1.10 ;)
[/quote]

bnetauth has nothing to do with realm packets.
February 7, 2004, 2:11 AM
FuzZ
I've also got the same problem.

here's the dump from SmartCheck
[code]LOAD_DLL base:02B80000 bnetauth.dll
EXCEPTION(2nd Chance) Exception: Access Violation
code: C0000005 addr:02B8DA30
bnetauth.dll-0000DA30 (02B80000)
invalid write to 15CAC749
EAX:15CAC749 EBX:0012EA9C ECX:00000000
EDX:67641AEB ESI:02B8DA2F EDI:00033050
ESP:02B8DA17 EBP:00000000 EIP:02B8DA30
EFLAGS:00000283
CS:001B DS:0023 ES:0023
SS:0023 FS:003B GS:0000
Stack dump
00033050:02B8DA2F:00000000:02B8DA37
Call stack
bnetauth.dll!0000DA30
Exception: Access Violation.[/code]

[quote]Perhaps you passed invalid input to it? [/quote]
[code]EXE: C:\Projects\Sleeper\star\starcraft.exe
StormDLL: C:\Projects\Sleeper\star\storm.dll
BnetDLL: C:\Projects\Sleeper\star\battle.snp
Hash: A=720246573 B=172158851 C=837634094 4 A=A-S B=B-C C=C^A A=A+B
Version: 0
checksum: 0
exeinfo: space(256)
MPQName: IX86ver7.mpq[/code]

Whenever I output that though, i have to do the Version/checksum/exeinfo/MPQName seperate from the hash, it always ends after the hash.
February 23, 2004, 5:28 AM
dRAgoN
As Skywing said you are probably just sending bad values to the checkrevision function / maybe declared wrong?.
show your code where you are sending the call to that function and the declaration.
February 23, 2004, 10:36 AM
FuzZ
[quote author=dRAgoN link=board=17;threadid=5078;start=0#msg45575 date=1077532610]
As Skywing said you are probably just sending bad values to the checkrevision function / maybe declared wrong?.
show your code where you are sending the call to that function and the declaration.
[/quote]
[code]
Public Declare Function z Lib "BnetAuth.dll" Alias "Z" (ByVal FileExe As String, ByVal FileStormDll As String, ByVal FileBnetDll As String, ByVal HashText As String, ByRef version As Long, ByRef checksum As Long, ByVal exeinfo As String, ByVal MPQName As String) As Long

Select Case UCase(StrReverse(bn_Client))
Case "RATS"
Result = z(App.Path & "\star\Starcraft.exe", App.Path & "\star\storm.dll", App.Path & "\star\battle.snp", Hash, version, checksum, exeinfo, MPQName)
Case "PXES"
Result = z(App.Path & "\star\Starcraft.exe", App.Path & "\star\storm.dll", App.Path & "\star\battle.snp", Hash, version, checksum, exeinfo, MPQName)
Case "NB2W"
Result = z(App.Path & "\w2bn\Warcraft II BNE.exe", App.Path & "\w2bn\storm.dll", App.Path & "\w2bn\battle.snp", Hash, version, checksum, exeinfo, MPQName)
Case "VD2D"
Result = z(App.Path & "\d2dv\game.exe", App.Path & "\d2dv\bnclient.dll", App.Path & "\d2dv\d2client.dll", Hash, version, checksum, exeinfo, MPQName)
Case Else
AddChat vbGreen, "<BNet> ", vbRed, "0x51: ERROR: Client not found."
End Select
If Result = "0" Then
AddChat vbGreen, "<BNet> ", vbRed, "CheckRevision() Failed."
frmMain.sckBnet.Close
Exit Function
Else
AddChat vbGreen, "<BNet> ", vbGreen, "CheckRevision() successful."
End If
[/code]
February 23, 2004, 4:57 PM
Null
Yea this hair pulling problem has occured when i tried using BnetAuth , i believe it is to do with my crappy version of vb6

What leads me to this conclusion you say

At home i have a downloaded , (Kazza) version of visual basic 6 , i try and make calls to bnetAuth in particaular i believe its function "X" (could be wrong) AcccountHash. This then inturns , Crashes my applicaton. With something along the lines of "Reference Memory yadda yadda"

At work however we have a "Legit" version of Visual Basic 6 , i ran the same application here at work , with no problems?

Could be blind luck i do not know , How ever it works for me so why not give it a go.

In conclusion: Buy a version of vb6 , or download one not so crappy as mine.
February 25, 2004, 3:49 AM
Null
Checkrivision.dll and hash.dll using the 0x1E Method
February 25, 2004, 8:09 AM
Stealth
I think this problem may have arisen with a select few StealthBot users under a very narrow set of circumstances. IIRC, it appeared to have been caused by the corruption of BNetAuth.dll in those instances. I haven't heard any new reports of it since my 2.3 release. (current)

Check the integrity of your copy of BNetAuth -- perhaps replace it with another copy -- and see if that helps?
February 25, 2004, 8:37 PM
FuzZ
Well, I managed to find the source for BnetAuth.dll.
I've recompiled and at the moment I'm getting this

LOAD_DLL base:02960000 BnetAuth.dll
UNLOAD_DLL (BnetAuth.dll) base: 02960000
OutDbStr: WARNING: BC.EventStream not registered!

it's not crashing the program now, but the connection is stalling checking the revision.. I haven't changed anything, except compiling my own dll.
February 26, 2004, 10:53 PM
UserLoser.
VC++ 6.0/7.0 runtimes maybe?
February 27, 2004, 12:16 AM
FuzZ
I have both VS6 and VS .net installed
In my case I wouldn't think so.
I've tried BnetAuth.dll from several different bots I have, all crash the program in SmartCheck

UserLoser. didn't I read somewhere you had BnetAuth ported into VB?
If so, if you would be kind enough that 'might' solve my problem and eliminate this dll, which would be kind of nice.
February 27, 2004, 12:31 AM
dRAgoN
[quote author=FuzZ link=board=17;threadid=5078;start=15#msg46236 date=1077841891]
I have both VS6 and VS .net installed
In my case I wouldn't think so.
I've tried BnetAuth.dll from several different bots I have, all crash the program in SmartCheck

UserLoser. didn't I read somewhere you had BnetAuth ported into VB?
If so, if you would be kind enough that 'might' solve my problem and eliminate this dll, which would be kind of nice.
[/quote]
if i remember Camel posted the datahash awhile back but the seeds were wrong in both the datahash/calchashbuf if you wana figure that out.

Edit: https://davnit.net/bnet/vL/phpbbs/index.php?board=17;action=display;threadid=1628
February 29, 2004, 1:29 AM
Networks
Could someone explain bnetauth.dll to me. I'd hate to post about something I dont have a clue about and since I use it as well.
March 3, 2004, 4:19 PM

Search