Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: TriCk on October 26, 2003, 01:02 AM

Title: Can Anyone Help?
Post by: TriCk on October 26, 2003, 01:02 AM
 [3:41:14 PM] Account Created: 10/6/2003, 09:08:51 (Battle.net time)
[3:41:14 PM] Last Logon: 10/26/2003, 05:35:43 (Battle.net time)
[3:41:14 PM] Last Logoff: 10/25/2003, 09:00:30 (Battle.net time)
[3:41:14 PM] Time Logged: 0 days, 11 hours, 20 minutes and 1 second
On StealthBot 2.2R4

Does anyone know how he gets that information?

What Packets...
I've PacketLogged it
and it looks like he sends...

System\Account Created
System\LastLogon
System\Last Logoff
System\Time Logged

But Trying this was unsuccessful, is there a packet i need to send with it?

Any help will be appreciated. Thanks
Title: Re:Can Anyone Help?
Post by: K on October 26, 2003, 01:05 AM
Those are profile keys.  You will need to request those keys using SID_READUSERDATA (0x26).  You can find the format for this packet (where else?) in Arta's BnetDocs.
Title: Re:Can Anyone Help?
Post by: TriCk on October 26, 2003, 01:11 AM
Another Question :-/

Ok i havent been there in so long... whats the url for bnetdocs ?
Title: Re:Can Anyone Help?
Post by: UserLoser on October 26, 2003, 01:34 AM
Edit your posts instead of replying 3 times which could have all been put into 1 post
Title: Re:Can Anyone Help?
Post by: TriCk on October 26, 2003, 01:43 AM
My bad  ???
Umm

1 more thing is annoying me...

If anyone knows what packet i need to send, because (0x26) seems to get me ipbanned... when i request the info...


Like this ....


Public Sub ReqSysInfo(strUser As String, Game As String)
   Dim lngKey As Long
   lngKey = GetTickCount()
   Dim PBuf As New PacketBuffer
   With PBuf
   .InsertDWORD 1
   .InsertDWORD 18
   .InsertDWORD lngKey
   .InsertNTString strUser
   .InsertNTString "System\Account Created"
   .InsertNTString "System\LastLogon"
   .InsertNTString "System\Last Logoff"
   .InsertNTString "System\Time Logged"
   .SendPacket &H26
   End With
   SysUsrVar = strUser
SysName = strUser
End Sub
Title: Re:Can Anyone Help?
Post by: Soul Taker on October 26, 2003, 01:02 AM
The format is:
Quote(DWORD)       Number of Accounts
(DWORD)       Number of Keys
(DWORD)       Request ID
(STRING[])    Requested Accounts
(STRING[])    Requested Keys
(STRING)       Unknown (Empty)
You are requesting four keys, yet your second DWORD is 0x18 (24).  I believe you should have the second DWORD be 0x05, because IIRC, the amount of keys always was one lower than the amount shown in the second DWORD (I don't know if it counts the account as a key or what, maybe someone else could explain why).

Edit: while re-reading everything, I noticed you are not sending the final empty string either (I just send an extra null byte cause I'm a horrible programmer like that =P)
Title: Re:Can Anyone Help?
Post by: TriCk on October 26, 2003, 01:44 AM

Public Sub ReqSysInfo(strUser As String, Game As String)
   Dim lngKey As Long
   lngKey = GetTickCount()
   Dim PBuf As New PacketBuffer
   With PBuf
   .InsertDWORD 1
   .InsertDWORD 4 ???????
   .InsertDWORD lngKey
   .InsertNTString strUser
   .InsertNTString "System\Account Created"
   .InsertNTString "System\LastLogon"
   .InsertNTString "System\Last Logoff"
   .InsertNTString "System\Time Logged"
   .SendPacket &H26 ( WILL I NEED TO SEND THIS? )
   End With
   SysUsrVar = strUser
SysName = strUser
End Sub
Title: Re:Can Anyone Help?
Post by: UserLoser on October 26, 2003, 01:49 AM
Yes you need to send it, duh, how else are you going to tell the server you want certain information? Also, you said you packet logged it, so go off of what you packet logged
Title: Re:Can Anyone Help?
Post by: TriCk on October 26, 2003, 01:59 AM
Is the 4 part in

   .InsertDWORD 4


Correct?
For The Amount Of Keys?
Title: Re:Can Anyone Help?
Post by: UserLoser on October 26, 2003, 02:06 AM
Quote from: TriCk on October 26, 2003, 01:44 AM
   .InsertNTString "System\Account Created"
   .InsertNTString "System\LastLogon"
   .InsertNTString "System\Last Logoff"
   .InsertNTString "System\Time Logged"

Well, let's pull out those algebra skills that you should have learned in school.

System\Account Created       1
System\LastLogon              +1
System\Last Logoff             +1
System\Time Logged           +1
--------------------------------------
                                          = 4
Title: Re:Can Anyone Help?
Post by: TriCk on October 26, 2003, 02:10 AM
LoL ..
Thanks for your smartass answer  :-\


Anyway +1 to all of u


THERES SOME MATHS FOR U UserLoser  ;D
Title: Re:Can Anyone Help?
Post by: iago on October 26, 2003, 06:55 AM
0x26 is quite possibly the easiest packet to decypher.  I figured out the whole thing in about 20 mins by packetloggings..
Title: Re:Can Anyone Help?
Post by: Kp on October 26, 2003, 07:54 AM
Quote from: Soul Taker on October 26, 2003, 01:02 AM
The format is:
Quote(DWORD)       Number of Accounts
(DWORD)       Number of Keys
(DWORD)       Request ID
(STRING[])    Requested Accounts
(STRING[])    Requested Keys
(STRING)       Unknown (Empty)
... the amount of keys always was one lower than the amount shown in the second DWORD (I don't know if it counts the account as a key or what, maybe someone else could explain why).
It has always been my theory that the final empty string is included in the key count because it is part of the Requested Keys set of strings.  Why they have an empty string in there if they already reference counted it, I'm uncertain.  Possibly they wrote their parser code to depend on one, then later realized that the counter field was better. *shrug*
Title: Re:Can Anyone Help?
Post by: Soul Taker on October 26, 2003, 09:50 AM
It's frustrating for me to write up a paragraph telling you how to fix your problem, even including what to send as a DWORD fo the amount of keys, and then seeing you ask what to send for the amount of keys :-\

Kp: yea, that would make sense.