Author | Message | Time |
---|---|---|
Yegg | Ok, im still learning a lot about battle.net packets but after a while of looking at bnetdocs, i learned some new things. I wanted to know if this is the proper code for creating an account. [code]pbuffer.InsertDWORD 5 pbuffer.InsertNTString varUser pbuffer.SendPacket &H2A[/code] Of couse varUser being the username. Can ne1 tel me if this is correct? Update: I tried this code and i got a winsock error. I need to know whats wrong with this code. | November 22, 2004, 1:04 AM |
Quarantine | First of all Which Winsock Error. | November 22, 2004, 1:45 AM |
Yegg | Well, [code]Private Sub wsBNET_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean) On Error Resume Next wsBNET.Close AddChat "Connection Closed!" & vbNewLine, vbRed End Sub[/code] occurs. | November 22, 2004, 3:02 AM |
drivehappy | Output the Description variable and tell us what it describes; what you posted tells us nothing. | November 22, 2004, 3:22 AM |
LoRd | The DWORD should actually be a series of 5 DWORD's which contain the values of your single-hashed password. | November 22, 2004, 7:22 AM |
Yegg | I think i understand wut ur saying, are these the 5 singled hashed passwords that i need? [code]pbuffer.InsertDWORD lngKey pbuffer.InsertDWORD lngSeed pbuffer.InsertDWORD lngValue1 pbuffer.InsertDWORD lngValue2 pbuffer.InsertDWORD lngValue3[/code] Update: Yah! It created the account. My only problem left is that all it does is creates the account and then it doesn't do ne thing else. it wont connect, look at the following code. [code] Case &H29 If Mid(Data, 5, 1) = Chr(1) Then AddChat "Passed!" & vbNewLine, vbGreen Connected = True pbuffer.InsertNTString varUser pbuffer.InsertBYTE 0 pbuffer.SendPacket &HA pbuffer.InsertDWORD 2 pbuffer.InsertNTString VarHome pbuffer.SendPacket &HC Else AddChat "Failed!" & vbNewLine, vbRed Randomize AAA = Int(Rnd * 5000) dblSeed = Val("&h" & StrToHex(StrReverse(ServerHash))) dblKey = AAA lngSeed = CLng(dblSeed) lngKey = CLng(dblKey) HashPass varpass, Len(varpass), lngKey, lngSeed, lngValue1, lngValue2, lngValue3 pbuffer.InsertDWORD lngKey pbuffer.InsertDWORD lngSeed pbuffer.InsertDWORD lngValue1 pbuffer.InsertDWORD lngValue2 pbuffer.InsertDWORD lngValue3 pbuffer.InsertNTString varUser pbuffer.SendPacket &H2A End If[/code] Now, after SendPacket &H2A do i have to do wsBNET.Connect? Or is there something else i forgot to add? Also, i didn't add a logonrespense to this so that it'd say if it created the account or if it failed. | November 22, 2004, 9:48 PM |
LivedKrad | Why would adding a logon response tell if creating the account failed? I'd say a logon response would be a response sent after "receiving logon". I believe Battle.net disconnects you after you create an account. | November 22, 2004, 10:50 PM |
Yegg | Ya, after trying this, i've noticed it does disconnect me, how do i get it to stay online? I try disconnected then connecting but that didn't work. So should i just try wsBNET.Connect alone? Ok, i just tried going wsBNET.Connect after it creates the account. It still isn't connecting. | November 22, 2004, 11:06 PM |
hismajesty | Change your error code; something like: [code]AddChat "BNET " & Number & ": " & Description & vbNewLine, vbRed[/code] so we can get a better idea of what the actual error is, aside from just disconnecting. | November 22, 2004, 11:49 PM |
Yegg | Sorry i didn't update my post again, but my problem now is not having the bot disconnect. It creates the accounts as it should, now, my only problem is logging on with the new account. I get logon failed. But i changed some code around, lemme show you what i did, this way does still create the account. [code] Case &H29 If Mid(Data, 5, 1) = Chr(1) Then AddChat "Passed!" & vbNewLine, vbGreen Connected = True pbuffer.InsertNTString varUser pbuffer.InsertBYTE 0 pbuffer.SendPacket &HA pbuffer.InsertDWORD 2 pbuffer.InsertNTString VarHome pbuffer.SendPacket &HC Else AddChat "Failed!" & vbNewLine, vbRed Randomize AAA = Int(Rnd * 5000) dblSeed = Val("&h" & StrToHex(StrReverse(ServerHash))) dblKey = AAA lngSeed = CLng(dblSeed) lngKey = CLng(dblKey) HashPass varpass, Len(varpass), lngKey, lngSeed, lngValue1, lngValue2, lngValue3 pbuffer.InsertDWORD lngKey pbuffer.InsertDWORD lngSeed pbuffer.InsertDWORD lngValue1 pbuffer.InsertDWORD lngValue2 pbuffer.InsertDWORD lngValue3 pbuffer.InsertNTString varUser pbuffer.SendPacket &H2A End If[/code] Now, this code creates the account like it should. My only problem is that when the bot tries to connect through the created account. It says that the password is incorrect. | November 23, 2004, 12:18 AM |
LoRd | You'll need to send SID_LOGONRESPONSE or SID_LOGONRESPONSE2 to login to the account using a double-hashed password instead of a single-hashed one. | November 23, 2004, 2:20 AM |
Yegg | Will that actually make a difference considering the account still gets created? | November 23, 2004, 2:46 AM |
Quarantine | Yes. | November 23, 2004, 3:39 PM |