• Welcome to Valhalla Legends Archive.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Goran

#2
1:12:56 AM) 0000:  FF 25 08 00 9E 3F 02 34                           ÿ%.ž?4........
(1:12:56 AM) 0000:  FF 50 66 00 00 00 00 00 87 1C 40 F0 94 E2 15 00   ÿPf.....‡@ð"â.
0010:  00 4D 89 7E 99 CB C6 01 76 65 72 2D 49 58 38 36   .M‰~™ËÆver-IX86
0020:  2D 37 2E 6D 70 71 00 43 3D 32 34 32 34 39 38 35   -7.mpq.C=2424985
0030:  32 36 20 41 3D 32 38 32 32 35 35 30 38 30 31 20   26 A=2822550801
0040:  42 3D 31 36 30 39 39 39 36 38 32 20 34 20 41 3D   B=160999682 4 A=
0050:  41 2D 53 20 42 3D 42 5E 43 20 43 3D 43 2D 41 20   A-S B=B^C C=C-A
0060:  41 3D 41 5E 42 00                                 A=A^B...........
(1:12:56 AM) 0000:  FF 51 09 00 00 00 00 00 00                        ÿQ..............
(1:12:56 AM) 0000:  FF 4C 16 00 49 58 38 36 4D 69 6E 64 53 69 67 68   ÿL.IX86MindSigh
0010:  74 2E 6D 70 71 00                                 t.mpq...........
(1:12:56 AM) 0000:  FF 3A 08 00 00 00 00 00                           ÿ:.............


Looks like its getting caught on Login...
I know I'm supposed to send it before EnterChat which I'm doing.  I'm doing it on &H0 is received for 3A.  Doing both...

BNCSPacketsLAP.ChangePass
BNCSPacketsLAP.EnterChat

Right after eachother.. should I be putting change pass somewhere else?
#3
Public Sub ChangePassword()
Dim ClientToken As Long
Dim NewPassword As String
Dim NewHash As String
NewHash = String$(20, 0)
ClientToken = GetTickCount()
NewPassword = LCase(BotVar.NewPassword)
X NewHash, NewPassword
With pBuffer
.InsertDWORD ClientToken
.InsertDWORD BotVar.ServerTokenMCP
.InsertNonNTString BotVar.PasswordHash
.InsertNonNTString NewHash
.InsertNTString BotVar.UserNameLAP
.SendPacketLAP &H31
End With
End Sub

Ok so this is what I got, it seems to be loading and connecting without errors but I'm getting IP banned so I assume I'm building the packet incorrectly.  Any ideas?
#4
No more Type Mismatch but now I'm getting ByRef Argument Type Mismatch and its highlighting NewHash.

Public Sub ChangePassword()
Dim ClientToken As Long
Dim NewPassword As Long
Dim NewHash As Long
ClientToken = GetTickCount()
NewPassword = LCase(BotVar.NewPassword)
X NewHash, NewPassword
With pBuffer
.InsertDWORD ClientToken
.InsertDWORD BotVar.ServerTokenMCP
.InsertNonNTString BotVar.PasswordHash
.InsertNonNTString NewHash <--- Highlighted :\
.InsertNTString BotVar.UserNameLAP
.SendPacketLAP &H31
End With
End Sub

Oh and the ServerTokenMCP is a long story and I don't feel like telling it...
#5
Dim ClientToken As Long
Dim Password As String
Dim NewHash As Long
ClientToken = GetTickCount()
Password = LCase(BotVar.NewPassword)
X NewHash, Password
With pBuffer
.InsertDWORD ClientToken
.InsertDWORD BotVar.ServerTokenMCP
.InsertDWORD BotVar.PasswordHash
.InsertDWORD NewHash
.InsertNTString BotVar.UserNameLAP
.SendPacketLAP &H31
End With

Getting type mismatch at BotVar.PasswordHash
When i put my mouse over it I see the hash info, strange characters blah blah.. sooo.. I guess I don't really know what type mismatch means.  If someone would kindly explain as I am a novice :)
#6
We all start somewhere, Shadow. :)
#7
So Dim NewHash as String should be an Integer instead?
#8
Ok so here is the new code..

Public Sub ChangePassword()

Dim ClientToken As Long
Dim NewHash As String
ClientToken = GetTickCount()
Password = LCase(BotVar.NewPassword)
X NewHash, Password
With pBuffer
.InsertDWORD ClientToken
.InsertDWORD BotVar.ServerTokenMCP
.InsertDWORD BotVar.PasswordHash
.InsertDWORD NewHash
.InsertNTString BotVar.UserNameLAP
.SendPacketLAP &H31
End With
End Sub

Has client token, X is the function on BnetAuth for a single pass hash Newhash being the hash and Password being the pass.  I set the password lowercase like you said I should. Made both hashes DWORDS. Is all this correct?

(BotVar.ServerTokenMCP IS the ServerToken.. long story.. & BotVar.PasswordHash is the old Pass hash from login which I stored in there.)


EDIT: Error! ByRef argument type mismatch.  Its highlighting NewHash and I assume maybe its not declared correctly.
#9
My problem is that I can't hash the passwords correctly. Like...

Public Declare Function a Lib "bnetauth.dll" Alias "A" (ByVal outbuf As String, ByVal ServerKey As Long, ByVal Password As String) As Long
Public Declare Function A2 Lib "bnetauth.dll" (ByVal outbuf As String, ByVal Key As Long) As Long
Public Declare Function C Lib "bnetauth.dll" (ByVal outbuf As String, ByVal serverhash As Long, ByVal prodid As Long, ByVal val1 As Long, ByVal val2 As Long, ByVal Seed As Long) As Long
Public Declare Function X Lib "bnetauth.dll" (ByVal outbuf As String, ByVal Password As String) As Long
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

Those are the declares for BnetAuth.. I don't really know which one to use for Double Hashing and can I not use the hash from when I logged in with the account?
#10
I've done it to log in and stuff but when i do something similar it doesn't work. Look below for the code:

Public Sub ChangePassword()

Dim ClientToken As Long
Dim pwHash3 As String
Dim Password As Integer
ClientToken = GetTickCount()
Password = BotVar.NewPassword
pwHash3 = String(7 * 4, vbNullChar)
a pwHash3, BotVar.ServerTokenMCP, Password
With pBuffer
.InsertDWORD ClientToken
.InsertDWORD BotVar.ServerTokenMCP
.InsertDWORD BotVar.PasswordHash
.InsertDWORD pwHash3
.InsertNTString BotVar.UserNameLAP
.SendPacketLAP &H31
End With
End Sub

What am I doing wrong?

I'm NUB no flaming please :'(
#11
welcome the the site...
#12
/WHOAMI -- Introductions / Hi Im Goran
June 03, 2006, 04:22 PM
Well Wats Up, My Name is Goran.