Author | Message | Time |
---|---|---|
OuTLawZGoSu | [code] 'TCPConnections (Module) Public Sub Profile(Data As String) On Error Resume Next Dim x As Integer Dim ProfileEnd As String Dim SplitProfile As Variant Dim splt() As String ProfileEnd = Mid(Data, 17, Len(Data)) SplitProfile = Split(ProfileEnd, Chr(&H0)) splt() = Split(SplitProfile(3), vbCrLf) 'SplitProfile (0) 'name '' form2.txtSex.text = SplitProfile(1) 'sex '' form2.txtLocation.text = SplitProfile(2) 'location '' form2.txtDescription.text = SplitProfile(3) 'description ' Form1.AddC vbRed, "Sex: " & SplitProfile(1) ' Form1.AddC vbRed, "Location: " & SplitProfile(2) ' Form1.AddC vbRed, "Description: " & SplitProfile(3) ''form2.UserToProfile = SplitProfile(0) fprofile.txtSex.Text = SplitProfile(1) fprofile.txtLocation.Text = SplitProfile(2) fprofile.txtDescription.Text = SplitProfile(3) fprofile.Visible = True End Sub Public Sub RequestProfile(strUser As String) On Error Resume Next PBuffer.InsertDWORD 1 PBuffer.InsertDWORD 4 PBuffer.InsertDWORD &H45 PBuffer.InsertNTString strUser PBuffer.InsertNTString "System\strUser" PBuffer.InsertNTString "system\Last Logon" PBuffer.InsertNTString "system\Account Expires" PBuffer.InsertNTString "system\Time Logged" PBuffer.InsertNTString "system\Last Logoff" PBuffer.sendPacket &H26 End Sub Public Sub setprofile(Info As String, Data As String) PBuffer.InsertDWORD 1 PBuffer.InsertDWORD 1 PBuffer.InsertBYTE 0 PBuffer.InsertNTString "profile\age" PBuffer.InsertNTString Data PBuffer.sendPacket &H27 End Sub '_____________________________ 'This, I put in a manual command, like stealthbot has. If Left(text1.Text, 8) = "/profile" Then Dim whoProfile As String whoProfile = Mid(text1.Text, InStr(text1.Text, "e") + 2) fprofile.Caption = whoProfile fprofile.txtname = whoProfile & "'s Profile" PBuffer.InsertDWORD 1 PBuffer.InsertDWORD 4 PBuffer.InsertDWORD &H405 PBuffer.InsertNTString whoProfile PBuffer.InsertNTString "Profile\Age" PBuffer.InsertNTString "Profile\Sex" PBuffer.InsertNTString "Profile\Location" PBuffer.InsertNTString "Profile\Description" PBuffer.sendPacket &H26 text1.Text = "" [/code] I cant figure out why this keeps disconnecting me. | February 25, 2004, 4:55 AM |
LoRd | [quote]Public Sub RequestProfile(strUser As String) On Error Resume Next PBuffer.InsertDWORD 1 PBuffer.InsertDWORD 4 PBuffer.InsertDWORD &H45 PBuffer.InsertNTString strUser PBuffer.InsertNTString "System\strUser" PBuffer.InsertNTString "system\Last Logon" PBuffer.InsertNTString "system\Account Expires" PBuffer.InsertNTString "system\Time Logged" PBuffer.InsertNTString "system\Last Logoff" PBuffer.sendPacket &H26 End Sub[/quote] The second DWORD of 0x26 should contain how many profile keys you are requesting, you said that there were 4 keys being requested, but in reality, there were 5 keys being requested. Also: System\Account Expires is not a valid profile key, but currently Battle.net does not disconnect and/or IPBan you for sending invalid profile keys. | February 25, 2004, 5:30 AM |
Zakath | [quote author=LoRd[nK] link=board=17;threadid=5447;start=0#msg45935 date=1077687001] [quote]Public Sub RequestProfile(strUser As String) On Error Resume Next PBuffer.InsertDWORD 1 PBuffer.InsertDWORD 4 PBuffer.InsertDWORD &H45 PBuffer.InsertNTString strUser PBuffer.InsertNTString "System\strUser" PBuffer.InsertNTString "system\Last Logon" PBuffer.InsertNTString "system\Account Expires" PBuffer.InsertNTString "system\Time Logged" PBuffer.InsertNTString "system\Last Logoff" PBuffer.sendPacket &H26 End Sub[/quote] The second DWORD of 0x26 should contain how many profile keys you are requesting, you said that there were 4 keys being requested, but in reality, there were 5 keys being requested. Also: System\Account Expires is not a valid profile key, but currently Battle.net does not disconnect and/or IPBan you for sending invalid profile keys. [/quote] System\strUser is also not a valid key. The one you're looking for is System\Username. And incidentally, why are you hardcoding all profile request IDs to be 0x45? Seems to me like that would make it difficult to figure out which person's profile you've got if you had multiple pending profile responses. | February 25, 2004, 5:51 AM |
OuTLawZGoSu | My firend put in this code in my project. It worked fine untill I modfied some of the code in my project with out testing it out. ( Didn't have my dsl then.) I think I edited something that I sholdnt of had. PS: Is there a better code you might put up here, or help me wit? I dont know shit about Editing, Receiving profiles. | February 25, 2004, 2:47 PM |
LoRd | [quote] Packet ID: 0x26 Direction: Client -> Server (Sent) Format: Help (DWORD) Number of Accounts (DWORD) Number of Keys (DWORD) Request ID (STRING[]) Requested Accounts (STRING[]) Requested Keys Remarks: Requests an extended profile. Some profile keys - this is not an exhaustive list: profile\sex profile\age profile\location profile\description record\GAME\0\wins record\GAME\0\losses record\GAME\0\disconnects record\GAME\0\last GAME record\GAME\0\last GAME result record\GAME\1\wins record\GAME\1\losses record\GAME\1\disconnects record\GAME\1\last game record\GAME\1\last game result record\GAME\1\rating record\GAME\1\high rating record\GAME\1\rank record\GAME\1\high rank Packet ID: 0x26 Direction: Server -> Client (Received) Format: Help (DWORD) Number of accounts (DWORD) Number of keys (DWORD) Request ID (STRING[]) Requested Key Values Remarks: Contains profile information as requested in C->S 0x26. [/quote] | February 25, 2004, 7:08 PM |
FuzZ | [quote author=OuTLawZGoSu link=board=17;threadid=5447;start=0#msg45932 date=1077684911][code] PBuffer.InsertDWORD 1 PBuffer.InsertDWORD 4 PBuffer.InsertDWORD &H405 PBuffer.InsertNTString whoProfile PBuffer.InsertNTString "Profile\Age" PBuffer.InsertNTString "Profile\Sex" PBuffer.InsertNTString "Profile\Location" PBuffer.InsertNTString "Profile\Description" PBuffer.sendPacket &H26 [/code][/quote] Notice the "PBuffer.InsertDWORD &H405" Maybe that's contributing to the problem? :EDIT: My mistake. | February 26, 2004, 11:20 PM |
LoRd | [quote author=FuzZ link=board=17;threadid=5447;start=0#msg46217 date=1077837630] [quote author=OuTLawZGoSu link=board=17;threadid=5447;start=0#msg45932 date=1077684911][code] PBuffer.InsertDWORD 1 PBuffer.InsertDWORD 4 PBuffer.InsertDWORD &H405 PBuffer.InsertNTString whoProfile PBuffer.InsertNTString "Profile\Age" PBuffer.InsertNTString "Profile\Sex" PBuffer.InsertNTString "Profile\Location" PBuffer.InsertNTString "Profile\Description" PBuffer.sendPacket &H26 [/code][/quote] Notice the "PBuffer.InsertDWORD &H405" Maybe that's contributing to the problem? [/quote] The token can be anything, Battle.net will just reply with the same token back. The token is used to help identify one profile from another in multiple requests, as Zakath stated. | February 26, 2004, 11:48 PM |
OuTLawZGoSu | Aight, I found the problem. Where it shows: [code] fprofile.Caption = whoProfile fprofile.txtname = whoProfile & "'s Profile" [/code] It should be fprofile.txtname.Caption = whoProfile & "'s Profile" Thats why I kept on gettin disonnected | February 27, 2004, 2:30 PM |
LoRd | [quote author=OuTLawZGoSu link=board=17;threadid=5447;start=0#msg46321 date=1077892211] Aight, I found the problem. Where it shows: [code] fprofile.Caption = whoProfile fprofile.txtname = whoProfile & "'s Profile" [/code] It should be fprofile.txtname.Caption = whoProfile & "'s Profile" Thats why I kept on gettin disonnected [/quote] That makes no sense, but ok! | February 27, 2004, 4:06 PM |
Networks | Where would u add the system keys to: [code]Packet ID: 0x26 Direction: Client -> Server (Sent) Format: Help (DWORD) Number of Accounts (DWORD) Number of Keys (DWORD) Request ID (STRING[]) Requested Accounts (STRING[]) Requested Keys Remarks: Requests an extended profile. Some profile keys - this is not an exhaustive list: profile\sex profile\age profile\location profile\description record\GAME\0\wins record\GAME\0\losses record\GAME\0\disconnects record\GAME\0\last GAME record\GAME\0\last GAME result record\GAME\1\wins record\GAME\1\losses record\GAME\1\disconnects record\GAME\1\last game record\GAME\1\last game result record\GAME\1\rating record\GAME\1\high rating record\GAME\1\rank record\GAME\1\high rank Packet ID: 0x26 Direction: Server -> Client (Received) Format: Help (DWORD) Number of accounts (DWORD) Number of keys (DWORD) Request ID (STRING[]) Requested Key Values Remarks: Contains profile information as requested in C->S 0x26. [/code] Also I having trouble be able to split the system keys so that I can parse it correctly which I also am having trouble with any help with that? | March 1, 2004, 4:21 PM |
UserLoser. | [quote author=Networks link=board=17;threadid=5447;start=0#msg46914 date=1078158072] Where would u add the system keys to: [/quote] Whereever you want | March 2, 2004, 2:03 AM |
LoRd | [quote author=UserLoser. link=board=17;threadid=5447;start=0#msg47002 date=1078192985] [quote author=Networks link=board=17;threadid=5447;start=0#msg46914 date=1078158072] Where would u add the system keys to: [/quote] Whereever you want [/quote] Keep in mind that the keys are returned in the order that they are requested in. | March 2, 2004, 2:17 AM |
UserLoser. | [quote author=LoRd[nK] link=board=17;threadid=5447;start=0#msg47007 date=1078193869] [quote author=UserLoser. link=board=17;threadid=5447;start=0#msg47002 date=1078192985] [quote author=Networks link=board=17;threadid=5447;start=0#msg46914 date=1078158072] Where would u add the system keys to: [/quote] Whereever you want [/quote] Keep in mind that the keys are returned in the order that they are requested in. [/quote] I don't understand what that has to do with putting them in whatever order you want | March 2, 2004, 2:25 AM |
CrAz3D | I know I'm somewhat reviving a dead topic here, but it is still on topic. VB6 When I request my keys, whether it be: [code] PacketBuf.InsertNTString "System\Username" PacketBuf.InsertNTString "System\Account Created" PacketBuf.InsertNTString "System\Last Logon" PacketBuf.InsertNTString "System\Last Logoff" PacketBuf.InsertNTString "System\Time Logged"[/code] or [code] PacketBuf.InsertNTString "profile\sex" PacketBuf.InsertNTString "profile\age" PacketBuf.InsertNTString "profile\location" PacketBuf.InsertNTString "profile\description"[/code] They are return in the order that I sent them, but not in the order that they Split(). IE: [quote]'[6:41:54 PM] 2 29608520 1681102539 created '[6:41:54 PM] 3 29623872 3218976033 logon '[6:41:54 PM] 4 29623863 3142340068 log off '[6:41:54 PM] 5 97642 time logged[/quote] Today is being returned as: [quote] [7:33:35 AM] 4 29622090 1673424946 created [7:33:35 AM] 5 29623980 2731395027 logon [7:33:35 AM] 6 29623979 2869513927 logoff [7:33:35 AM] 7 509 time logged [/quote] The index of the order in the string as each is returned is infront of the rest for the string. Is there a way to display the Profile info with trying to display SplitProfile(4)? EDIT:Forgot Splitting code [code] For i = 1 To UBound(SplitProfile) If i = 3 Then SPP = Split(SplitProfile(3), " ") FT.dwHighDateTime = SPP(0) FT.dwLowDateTime = SPP(1) Call FileTimeToLocalFileTime(FT, FT) Call FileTimeToSystemTime(FT, st) TIMEO = st.wHour & ":" & st.wMinute & ":" & st.wSecond TIMEO = Format(TIMEO, "hh:mm:ss ampm") AddChat vbGreen, "Account Created: ", vbCrLf & &HC0C000, st.wMonth & "/" & st.wDay & "/" & st.wYear, vbCrLf & vbRed, " @ ", vbCrLf & &HC0C000, TIMEO ElseIf i = 4 Then SPP = Split(SplitProfile(4), " ") FT.dwHighDateTime = SPP(0) FT.dwLowDateTime = SPP(1) Call FileTimeToLocalFileTime(FT, FT) Call FileTimeToSystemTime(FT, st) TIMEO = st.wHour & ":" & st.wMinute & ":" & st.wSecond TIMEO = Format(TIMEO, "hh:mm:ss ampm") AddChat vbGreen, "Last Logon: ", vbCrLf & &HC0C000, st.wMonth & "/" & st.wDay & "/" & st.wYear, vbCrLf & vbRed, " @ ", vbCrLf & &HC0C000, TIMEO ElseIf i = 5 Then SPP = Split(SplitProfile(5), " ") FT.dwHighDateTime = SPP(0) FT.dwLowDateTime = SPP(1) Call FileTimeToLocalFileTime(FT, FT) Call FileTimeToSystemTime(FT, st) TIMEO = st.wHour & ":" & st.wMinute & ":" & st.wSecond TIMEO = Format(TIMEO, "hh:mm:ss ampm") AddChat vbGreen, "Last Log Off: ", vbCrLf & &HC0C000, st.wMonth & "/" & st.wDay & "/" & st.wYear, vbCrLf & vbRed, " @ ", vbCrLf & &HC0C000, TIMEO ElseIf i = 6 Then AddChat vbGreen, "Time Logged: ", vbCrLf & &HC0C000, ConvertTime(SplitProfile(6) * 1000) End If Next i[/code] | March 10, 2004, 2:36 PM |
Networks | Crazed how did you parse them so that you were able to use the addchat function. I cant figure that out. I can't even get to that step can anyone show the light? | March 10, 2004, 2:46 PM |
CrAz3D | FILTTIME & SYSTEMTIME Once you put in the proper declares & types do: [code]Dim FT as New FILETIME, ST as New SystemTime FT.dwHighDate = *the highdate* FT.dwLowDate = *low date* call FileTimeToLocalFileTime(FT, FT) call FileTimeToSystemTime(FT, ST) [/code] And there you go. Then just look @ what is NOW in ST. How do I parse the Profile Return better though? | March 10, 2004, 2:55 PM |
UserLoser. | [quote] IE: Quote: '[6:41:54 PM] 2 29608520 1681102539 created '[6:41:54 PM] 3 29623872 3218976033 logon '[6:41:54 PM] 4 29623863 3142340068 log off '[6:41:54 PM] 5 97642 time logged Today is being returned as: Quote: [7:33:35 AM] 4 29622090 1673424946 created [7:33:35 AM] 5 29623980 2731395027 logon [7:33:35 AM] 6 29623979 2869513927 logoff [7:33:35 AM] 7 509 time logged [/quote] That's not a very good example, showing two different accounts when saying here's the difference between yesterday and today | March 11, 2004, 1:00 AM |
CrAz3D | Ok, I'll make sure next time...it probably could've ME some somewhere. ANSWER: https://davnit.net/bnet/vL/phpbbs/index.php?board=31;action=display;threadid=5712 | March 11, 2004, 2:09 AM |