Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: botmaster on February 04, 2004, 09:26 AM

Title: bnetauth.dll
Post by: botmaster on February 04, 2004, 09:26 AM
anyone else using this for hashing? if so is it making your bot crash?
Title: Re:bnetauth.dll
Post by: o.OV on February 04, 2004, 12:10 PM
Quote from: botmaster on February 04, 2004, 09:26 AM
anyone else using this for hashing? if so is it making your bot crash?

I have used bnetauth before and no. It doesn't cause my bot to crash.
Title: Re:bnetauth.dll
Post by: Dyndrilliac on February 04, 2004, 02:02 PM
I would assume this is faulty code, as I use this DLL and have no problems.
Title: Re:bnetauth.dll
Post by: botmaster on February 04, 2004, 02:47 PM
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.


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


anyone know why it would exit?
Title: Re:bnetauth.dll
Post by: Skywing on February 05, 2004, 12:14 AM
Perhaps you passed invalid input to it?
Title: Re:bnetauth.dll
Post by: botmaster on February 05, 2004, 08:47 AM
if it was invalid would it stll connect and login?
Title: Re:bnetauth.dll
Post by: Skywing on February 05, 2004, 08:54 AM
Quote from: botmaster on February 05, 2004, 08:47 AM
if it was invalid would it stll connect and login?
Possibly.  You could be passing some input that causes heap corruption, leading to later failures, for instance.
Title: Re:bnetauth.dll
Post by: botmaster on February 05, 2004, 01:01 PM
alright ill look into it thanks.
Title: Re:bnetauth.dll
Post by: Arthas on February 06, 2004, 12:00 AM
yes, I encountered problems with some D2 realm packets in my version. Thats probably just because of 1.10 ;)
Title: Re:bnetauth.dll
Post by: Maddox on February 06, 2004, 08:11 PM
Quote from: Arthas on February 06, 2004, 12:00 AM
yes, I encountered problems with some D2 realm packets in my version. Thats probably just because of 1.10 ;)

bnetauth has nothing to do with realm packets.
Title: Re:bnetauth.dll
Post by: FuzZ on February 22, 2004, 11:28 PM
I've also got the same problem.

here's the dump from SmartCheck
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.


QuotePerhaps you passed invalid input to it?
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


Whenever I output that though, i have to do the Version/checksum/exeinfo/MPQName seperate from the hash, it always ends after the hash.
Title: Re:bnetauth.dll
Post by: l)ragon on February 23, 2004, 04:36 AM
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.
Title: Re:bnetauth.dll
Post by: FuzZ on February 23, 2004, 10:57 AM
Quote from: dRAgoN on February 23, 2004, 04:36 AM
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.

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
Title: Re:bnetauth.dll
Post by: effect on February 24, 2004, 09:49 PM
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.
Title: Re:bnetauth.dll
Post by: effect on February 25, 2004, 02:09 AM
Checkrivision.dll and hash.dll using the 0x1E Method
Title: Re:bnetauth.dll
Post by: Stealth on February 25, 2004, 02:37 PM
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?
Title: Re:bnetauth.dll
Post by: FuzZ on February 26, 2004, 04:53 PM
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.
Title: Re:bnetauth.dll
Post by: UserLoser. on February 26, 2004, 06:16 PM
VC++ 6.0/7.0 runtimes maybe?
Title: Re:bnetauth.dll
Post by: FuzZ on February 26, 2004, 06:31 PM
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.
Title: Re:bnetauth.dll
Post by: l)ragon on February 28, 2004, 07:29 PM
Quote from: FuzZ on February 26, 2004, 06:31 PM
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.
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: http://forum.valhallalegends.com/phpbbs/index.php?board=17;action=display;threadid=1628
Title: Re:bnetauth.dll
Post by: Networks on March 03, 2004, 10:19 AM
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.