Valhalla Legends Forums Archive | Battle.net Bot Development | CalcHashBuf??

AuthorMessageTime
XTRB
I'm trying to create accounts using
[code]
SendPacket &H3D, CalcHashBuf(Password) & UserName & Chr(0)
[/code]

but, I don't have the calchashbuf function. I've been trying to hash the password using my function for when just logging on normally. Someone wanna tell me what I'm doing wrong?
[code]
Function PassHashed(ByVal password As String, ByVal Seed As Long)
Dim lngKey As Long, lngSeed As Long, lngValue1 As Long, lngValue2 As Long, lngValue3 As Long
lngKey = GetTickCount
lngSeed = Seed
PassHashed = PassHashed & GetDW(lngKey)
PassHashed = PassHashed & GetDW(lngSeed)
HashPass LCase(password), Len(password), lngKey, lngSeed, lngValue1, lngValue2, lngValue3
PassHashed = PassHashed & GetDW(lngKey)
PassHashed = PassHashed & GetDW(lngSeed)
PassHashed = PassHashed & GetDW(lngValue1)
PassHashed = PassHashed & GetDW(lngValue2)
PassHashed = PassHashed & GetDW(lngValue3)
End Function
[/code]
April 30, 2003, 4:22 PM
Camel
why do you have LCase(password) ?
what if a user's password actually has capital letters in it?

[edit] use X from bnetauth.dll instead of calchashbuf
April 30, 2003, 8:29 PM
laurion
[quote author=Camel link=board=17;threadid=1193;start=0#msg8863 date=1051734572]
why do you have LCase(password) ?
what if a user's password actually has capital letters in it?


[/quote]
Because Battle.Net Passwords Aren't Case Sensative.
April 30, 2003, 8:40 PM
tA-Kane
[quote author=laurion link=board=17;threadid=1193;start=0#msg8868 date=1051735213]Because Battle.Net Passwords Aren't Case Sensative.[/quote]
Actually, because of the nature of the hashing algorithm, they are case sensative.
April 30, 2003, 8:49 PM
Camel
how could they possibly not be case sensitive? they're stored post-encryption. last time i checked, one way encryption only went one way.
besides, even if they weren't case sensitive, there would still be no point in using LCase(), because they wouldn't be case-sensitive
April 30, 2003, 8:55 PM
kamakazie
[quote author=Camel link=board=17;threadid=1193;start=0#msg8871 date=1051736156]
how could they possibly not be case sensitive? they're stored post-encryption. last time i checked, one way encryption only went one way.
besides, even if they weren't case sensitive, there would still be no point in using LCase(), because they wouldn't be case-sensitive
[/quote]

From Diablo II BnClient.dll:
[code]
.text:6FF06ABC push esi ; cchPasswordLength
.text:6FF06ABD push edx ; lpszPassword
.text:6FF06ABE call ds:CharLowerBuffA
[/code]

From Starcraft Battle.snp:
[code]
.text:1901A5F1 push edi ; cchPasswordLength
.text:1901A5F2 push ecx ; lpszPassword
.text:1901A5F3 call ds:CharLowerBuffA
[/code]

From Warcraft II BNE Battle.snp:
[code]
.text:19019A2A push edi ; cchPasswordLength
.text:19019A2B push eax ; lpszPassword
.text:19019A2C call ds:CharLowerBuffA
[/code]

Sigh...please be more informed.

As for Warcraft III, I wouldn't know.

Edit: each of those were taken from either SID_LOGON2 or SID_LOGONRESPONSE
April 30, 2003, 9:39 PM
Arta
Just in case assembler breaks your fragile mind: Battle.net usernames & passwords are NOT case sensitive.

In fact, I can't think of anything on Battle.net that is.
May 1, 2003, 1:41 AM
XTRB
[quote author=Camel link=board=17;threadid=1193;start=0#msg8863 date=1051734572]
why do you have LCase(password) ?
what if a user's password actually has capital letters in it?

[edit] use X from bnetauth.dll instead of calchashbuf
[/quote]

use X from bnetauth.dll instead of calchashbuf?
This...
[code]
Public Declare function X Lib "bnetauth.dll" Alias "X" (strHash as string) as string ????
[/code]
Returns "Dll entry point X can't be found" or w/e

Since I'm questioning this, could someone perhaps also tell me how to get a list of functions out of a dll? I know using a hex editor I can find the function/sub names, but having problems with the variables included within the functions/subs.
May 1, 2003, 5:06 AM
XTRB
[quote author=Maddox link=board=17;threadid=1193;start=0#msg8912 date=1051766625]
X is not calchashbuf, although it may use it. You can find the declarations for bnetauth.dll in the EthBot source.
[/quote]

Not sure where you got EthBot's source, but I got mine from http://zorm.phactorx.com/downloads.html and all I found regarding bnetauth.dll was
[code]
Public Declare Function CreateAccount Lib "bnetauth.dll" (ByVal outbuf As String, ByVal Password As String) As Long
[/code]
Is that what i need to use instead of calchashbuf? and if so, what is the outbuf variable for?
May 1, 2003, 6:00 AM
Camel
[quote author=Maddox link=board=17;threadid=1193;start=0#msg8912 date=1051766625]
X is not calchashbuf, although it may use it. You can find the declarations for bnetauth.dll in the EthBot source.
[/quote]

my calchashbuf is the same as X
May 1, 2003, 5:36 PM
Etheran
[quote author=Arta[vL] link=board=17;threadid=1193;start=0#msg8886 date=1051753268]
Just in case assembler breaks your fragile mind: Battle.net usernames & passwords are NOT case sensitive.

In fact, I can't think of anything on Battle.net that is.
[/quote]It's not battle.net that's not case sensitive to your password, but rather, it's the clients.
May 1, 2003, 10:33 PM
kamakazie
[quote author=Etheran link=board=17;threadid=1193;start=0#msg8959 date=1051828387]
It's not battle.net that's not case sensitive to your password, but rather, it's the clients.
[/quote]

I think he realizes that. Point is however, the client makes the password lowercase, therefore if you wish to emulate the client it would be best to make the password lowercase as well. Otherwise, if you create an account (provided you hash it with uppercase characters) with your bot and try to logon with a client you'll get an invalid password. Always best to emulate what the real client does.
May 1, 2003, 11:03 PM
Arta
I do indeed realise that, but it's perhaps an elusive point. I think I'll add a clarification @ bnetdocs.
May 2, 2003, 12:06 AM
Camel
[quote author=Arta[vL] link=board=17;threadid=1193;start=0#msg8966 date=1051834019]
I do indeed realise that, but it's perhaps an elusive point. I think I'll add a clarification @ bnetdocs.
[/quote]

good idea. i had to explain to like, three people how blizzard actually has no idea what your pre-hashed password is (and for this reason, it is impossible for them to restore lost password).
May 2, 2003, 9:13 PM
Yoni
Not impossible, but would take a large amount of months.
May 3, 2003, 12:32 PM
XTRB
No offense guys, but I'm still not really figuring out how to use X if it's a real function within bNetAuth.dll.
May 3, 2003, 4:45 PM
Kp
[quote author=XTRB link=board=17;threadid=1193;start=15#msg9051 date=1051980331]
No offense guys, but I'm still not really figuring out how to use X if it's a real function within bNetAuth.dll.
[/quote]IIRC, BNLS was recently modified to provide greater flexibility in hash computation. If you give up on bnetauth.dll, you might look at using BNLS -- which would have the added benefit of freeing your client from carrying around version check hashes.
May 3, 2003, 5:29 PM
dRAgoN
[quote author=Camel link=board=17;threadid=1193;start=15#msg9004 date=1051909996]
[quote author=Arta[vL] link=board=17;threadid=1193;start=0#msg8966 date=1051834019]
I do indeed realise that, but it's perhaps an elusive point. I think I'll add a clarification @ bnetdocs.
[/quote]

good idea. i had to explain to like, three people how blizzard actually has no idea what your pre-hashed password is (and for this reason, it is impossible for them to restore lost password).
[/quote]

In some special case's however, they can infact change your hash to a password that they make.
May 3, 2003, 7:56 PM
tA-Kane
[quote author=dRAgoN link=board=17;threadid=1193;start=15#msg9068 date=1051991814]In some special case's however, they can infact change your hash to a password that they make.[/quote]You're implying that when they do this, they have to know your password in order to change it. This is incorrect. All they would need to do is use a different packet or command (most likely only accessable to admins), which simply replaces the account's stored hash data with the new password's hash, instead of checking to see if the old password hash is the same as the stored password hash.
May 3, 2003, 10:06 PM
Yoni
[quote author=Kp link=board=17;threadid=1193;start=15#msg9053 date=1051982976]
IIRC, BNLS was recently modified to provide greater flexibility in hash computation. If you give up on bnetauth.dll, you might look at using BNLS -- which would have the added benefit of freeing your client from carrying around version check hashes.
[/quote]Not that recently. And yes, since mid-February, the BNLS_HASHDATA (0x0b) message may be used to "double-hash" your data in one message - so you just send the password (and the key), and it replies with the double-hash.
May 3, 2003, 11:10 PM
dRAgoN
[quote author=tA-Kane link=board=17;threadid=1193;start=15#msg9085 date=1051999589]
[quote author=dRAgoN link=board=17;threadid=1193;start=15#msg9068 date=1051991814]In some special case's however, they can infact change your hash to a password that they make.[/quote]You're implying that when they do this, they have to know your password in order to change it. This is incorrect. All they would need to do is use a different packet or command (most likely only accessable to admins), which simply replaces the account's stored hash data with the new password's hash, instead of checking to see if the old password hash is the same as the stored password hash.
[/quote]

and where did i imply that they had to know the prev. password?
May 4, 2003, 8:41 AM
tA-Kane
[quote author=dRAgoN link=board=17;threadid=1193;start=15#msg9124 date=1052037693]and where did i imply that they had to know the prev. password?[/quote]Maybe you didn't mean to imply it, but to me you had implied it when you said that they could change the password and you didn't say that they didn't need to know the old password. :-\

As such, I had posted a clarification of your words (with use of an example of how it may be accomplished), for others who may have assumed what I thought you had implied.
May 4, 2003, 9:12 PM
dRAgoN
[quote author=tA-Kane link=board=17;threadid=1193;start=15#msg9155 date=1052082739]
[quote author=dRAgoN link=board=17;threadid=1193;start=15#msg9124 date=1052037693]and where did i imply that they had to know the prev. password?[/quote]Maybe you didn't mean to imply it, but to me you had implied it when you said that they could change the password and you didn't say that they didn't need to know the old password. :-\

As such, I had posted a clarification of your words (with use of an example of how it may be accomplished), for others who may have assumed what I thought you had implied.
[/quote]

it's ok you'll figure me out one of these days ^^.
May 5, 2003, 1:08 AM

Search