Author | Message | Time |
---|---|---|
Arthas | Here's the code I am using to invite people into clans with: [code] With pBuffer .InsertDWORD &H1 .InsertNTString Username .SendPacket frmMain.sckBnet, &H77 .InsertDWORD &H0 .InsertDWORD &H0 .InsertDWORD &H0 .InsertDWORD &H0 .SendPacket frmMain.sckBnet, &H15 End With [/code] Not getting IP banned..... It just will not work. Any suggestions? | December 30, 2003, 6:23 AM |
Soul Taker | Don't know why you included 0x15 with that. It looks okay to me, here's what I use: [code] Public Function CLAN_INVITE(Socket As Integer, strUser As String) p.InsertDWORD &H0 'cookie p.InsertNTString strUser p.SendPacket frmMain.sckBnet(Socket), &H77 End Function [/code] | December 30, 2003, 12:48 PM |
UserLoser. | It's probably that 0x15 of yours... [code] Public Sub x15() With PBuffer .InsertDWORD GetDWORD("68XI") .InsertDWORD GetDWORD(GetClientID) .InsertDWORD &H0 .InsertDWORD lAdCookie .SendPacket &H15 End With End Sub [/code] | December 30, 2003, 5:21 PM |
Soar | To Arthas: Packet 0x15 is Adbanner request packet, you should not send it here. To Soul Taker: In official BN packets, the Cookie of invite packet should be at least 1. PS, when you are invited by others, you will receive a 0x78 packet, this packet contains Cooke(the same as that one in 0x77 packet invitor sent), clan tag, clan name and invitor account name. You can reply it with that Cookie and a result byte(04 - decline 06 - accept) | December 30, 2003, 5:29 PM |
UserLoser. | I believe the Warcraft III game client it's self has a static variable that increments each time (starts at 1), and is used as a cookie. I've seen it in some other War3-game packets such as 0x61. Not sure if the game does the same for clan packets | December 30, 2003, 5:31 PM |
Soar | the Cookie increases when you invite multiple users to your clan. In clan packets, some Cookies are increased by client(just like invite, remove and so on) and some are increased by server(just like create, and seems only these packets, 0x71 and 0x72) | December 30, 2003, 5:36 PM |
Arthas | Either or, it's not working. With or without the 0x15 packet. So, does your Clan Invite packet work at the moment? Or is it... Screwed up also? Just wondering... -Arthas | December 30, 2003, 8:11 PM |
UserLoser. | Make sure: 1) You're in a clan 2) You're the chieftain or shamen 3) The user your trying to invite is in your channel (not sure 100% if this matters) | December 30, 2003, 8:51 PM |
Arthas | lol, I know all that. I'll try somthing else...... Thanks anyways. | December 30, 2003, 9:27 PM |
Soar | Please don't insert NTString, just insert a string. The username should be ended by a '\0' character. | December 31, 2003, 3:52 AM |
Arthas | Sorry, I feel retarded. Though it's not excactly my fault :P My clan was FULL........ lol. Sorry for wasting your time :-[ | December 31, 2003, 4:52 AM |
Soul Taker | [quote author=Soar link=board=17;threadid=4508;start=0#msg37698 date=1072842734] Please don't insert NTString, just insert a string. The username should be ended by a '\0' character. [/quote] Why? It's much simpler to grab the name from the userlist and send it as a proper string than it is to append a null byte and send a non-NT string. | December 31, 2003, 4:55 AM |
Soar | sorry, it's my fault in C codes, NTString = None-Terminate String Seems in VB codes, NTString =Null-Terminated String | December 31, 2003, 3:39 PM |
Kp | [quote author=Soar link=board=17;threadid=4508;start=0#msg37740 date=1072885170] in C codes, NTString = None-Terminate String[/quote] Who taught you that? I've never seen that designation. | December 31, 2003, 4:38 PM |
Soar | in bnetd packet.c/packet.h packet_append_ntstring() and packet_append_string(), :) | December 31, 2003, 4:44 PM |
UserLoser. | BnetD/PVPGN coding isn't always correct and isn't a great source for information on Battle.net | December 31, 2003, 5:16 PM |
Kp | [quote author=Soar link=board=17;threadid=4508;start=0#msg37747 date=1072889043] in bnetd packet.c/packet.h packet_append_ntstring() and packet_append_string(),[/quote] bnetd is almost legendary for their bad coding and misunderstanding of protocol. Learning anything from them is almost always a mistake. :P | December 31, 2003, 5:18 PM |
Soar | Unfortunately I'm one of the coders in pvpgn team. ;) Actually we don't think we know somewhat less about bnet protocols than you do. At least we know a lot of special values in some packets that vL bnetdocs doesn't give out. Also we now don't think the FF is the only start signal of bnet protocol, F7 is also a start signal which exists in War3 ladder/tournament packets. So packets IDs are seen as short in our project (0x??FF and 0x??F7) | December 31, 2003, 5:28 PM |
UserLoser. | [quote author=Soar link=board=17;threadid=4508;start=15#msg37766 date=1072891708] At least we know a lot of special values in some packets that vL bnetdocs doesn't give out. [/quote] I'm pretty sure they know everything you guys have, and more... There's more than what you see with your access on BnetDocs | December 31, 2003, 6:10 PM |
Skywing | [quote author=Soar link=board=17;threadid=4508;start=15#msg37766 date=1072891708] Unfortunately I'm one of the coders in pvpgn team. ;) Actually we don't think we know somewhat less about bnet protocols than you do. At least we know a lot of special values in some packets that vL bnetdocs doesn't give out. Also we now don't think the FF is the only start signal of bnet protocol, F7 is also a start signal which exists in War3 ladder/tournament packets. So packets IDs are seen as short in our project (0x??FF and 0x??F7) [/quote] At least for battle.snp games, the magic FF is definitely treated seperately from the message id. The game does something like this: [code]for(*p = buf; p != buf+bufused && *p != 0xff; p++) ; if(p == buf+bufused) abort; /* handle msg and adjust buf/bufused based on length in message header */ [/code] ..when receiving messages from the server. Additionally, note that the FF is hardcoded inside of SendServerMessage and not specified by the caller. Are you sure you're not thinking of the War3 in-game protocol for magic being F7? | December 31, 2003, 8:40 PM |
Soar | Yep, I know they have the hash algorithm of war3 password. That's the only thing we don't know. Btw, I didn't mean the lack of packet IDs in bnetdocs, but the values in some packts, I'm sure that we know more than vL does. i.e, create account S->C result value, it can be about 8 or 9 return values(just like too many punctuation narrowed, username have banned words and such such), but vL only know part of them. I know vL only give out the packets that used for bot dev, ;) | December 31, 2003, 8:44 PM |
Skywing | [quote author=Soar link=board=17;threadid=4508;start=15#msg37801 date=1072903456] Yep, I know they have the hash algorithm of war3 password. That's the only thing we don't know. Btw, I didn't mean the lack of packet IDs in bnetdocs, but the values in some packts, I'm sure that we know more than vL does. i.e, create account S->C result value, it can be about 8 or 9 return values(just like too many punctuation narrowed, username have banned words and such such), but vL only know part of them. I know vL only give out the packets that used for bot dev, ;) [/quote] That depends on which create account message you are using. AFAIK, there are 2 used statuses for SID_CREATEACCOUNT, 6 used statuses for SID_CREATEACCOUNT2 (which for a very short period of time included a suggested, unused account name until Blizzard removed this for performance reasons; I think my client was the only program that ever took advantage of this [Diablo II didn't, and at the time was the only Blizzard program that used this message]), and 8 used statuses for SID_AUTH_ACCOUNTCREATE. Update on magic values for B.net headers: It looks like the War3 b.net client will disconnect if it receives a message with magic other than 0xFF: [code].text:6F37DAD7 loc_6F37DAD7: ; CODE XREF: sub_6F37DA10+33j .text:6F37DAD7 mov edi, [ebp+arg_8] .text:6F37DADA cmp edi, 4 .text:6F37DADD jb short incomplete_header .text:6F37DADF mov ebx, [ecx] .text:6F37DAE1 cmp bl, 0FFh .text:6F37DAE4 mov edx, ecx .text:6F37DAE6 mov [ebp+var_20], ebx .text:6F37DAE9 jnz short bad_message_abort_connection ; bad magic .text:6F37DAEB mov ax, word ptr [ebp+var_20+2] .text:6F37DAEF cmp ax, 4 .text:6F37DAF3 jb short bad_message_abort_connection ; length < sizeof(header) .text:6F37DAF5 cmp ax, 1000h .text:6F37DAF9 jnb short bad_message_abort_connection ; length > MAX_MESSAGE_SIZE [/code] I see nothing handling magic 0xF7 (for BNCS messages). I know that magic 0xF7 is used for the in-game protocol, however. | December 31, 2003, 8:52 PM |
Soar | mostly right, but you missed that there're 3 createaccount packets, the latest 1 is for War3/W3xp only, which has the different result handling value than that of SID_CREATEACCOUNT2 btw, 0x??F7 is not used in bot dev, that's only a game preparing packet. In bot dev, FF could be think as the only magic handling | January 1, 2004, 5:22 AM |
UserLoser. | [quote author=Soar link=board=17;threadid=4508;start=15#msg37850 date=1072934525] mostly right, but you missed that there're 3 createaccount packets, the latest 1 is for War3/W3xp only, which has the different result handling value than that of SID_CREATEACCOUNT2 [/quote] He didn't miss the 3rd one [quote author=Skywing link=board=17;threadid=4508;start=15#msg37804 date=1072903939] and 8 used statuses for SID_AUTH_ACCOUNTCREATE. [/quote] That's one problem - BnetD/PVPGN doesn't use the real names of the packets | January 1, 2004, 5:29 AM |
Arta | My main reason for starting work on TestBNCS was the total inadequacy of BnetD/Pvpgn. I'll just leave it at that, for now. | January 1, 2004, 5:36 AM |
Soar | [quote author=UserLoser. link=board=17;threadid=4508;start=15#msg37851 date=1072934981] That's one problem - BnetD/PVPGN doesn't use the real names of the packets [/quote] hehe, this sounds strange, no one made a standard that the packet name is SID_xxxx or CLIENT_xxx/SERVER_xxx we only know the packet id, packet name is defined by ourselves to descript its usage only. | January 1, 2004, 4:34 PM |
Soar | [quote author=Skywing link=board=17;threadid=4508;start=15#msg37804 date=1072903939] That depends on which create account message you are using. AFAIK, there are 2 used statuses for SID_CREATEACCOUNT, 6 used statuses for SID_CREATEACCOUNT2 (which for a very short period of time included a suggested, unused account name until Blizzard removed this for performance reasons; I think my client was the only program that ever took advantage of this [Diablo II didn't, and at the time was the only Blizzard program that used this message]), and 8 used statuses for SID_AUTH_ACCOUNTCREATE. [/quote] I checked pvpgn bnet protocol file just now, there are 9 used statuses for SID_CREATEACCOUNT2 (SERVER_CREATEACCTREPLY2 in pvpgn) it's only sent from D2 1.03~1.10. ;) | January 1, 2004, 4:41 PM |
Arta | [quote author=Soar link=board=17;threadid=4508;start=15#msg37899 date=1072974899] hehe, this sounds strange, no one made a standard that the packet name is SID_xxxx or CLIENT_xxx/SERVER_xxx [/quote] err.. yeah they did. The SID_* constants are the names Blizzard use for their packets. They were kind enough to leave them in Battle.snp in previous versions of Starcraft. The most recent ones aren't known (Friends & Clan packets), since the official names have now been removed from all the clients, so far as we know. | January 1, 2004, 4:42 PM |
UserLoser. | [quote author=Soar link=board=17;threadid=4508;start=15#msg37902 date=1072975295] I checked pvpgn bnet protocol file just now, there are 9 used statuses for SID_CREATEACCOUNT2 (SERVER_CREATEACCTREPLY2 in pvpgn) it's only sent from D2 1.03~1.10. ;) [/quote] And what are these 9? | January 1, 2004, 7:24 PM |
Skywing | [quote author=Soar link=board=17;threadid=4508;start=15#msg37902 date=1072975295] [quote author=Skywing link=board=17;threadid=4508;start=15#msg37804 date=1072903939] That depends on which create account message you are using. AFAIK, there are 2 used statuses for SID_CREATEACCOUNT, 6 used statuses for SID_CREATEACCOUNT2 (which for a very short period of time included a suggested, unused account name until Blizzard removed this for performance reasons; I think my client was the only program that ever took advantage of this [Diablo II didn't, and at the time was the only Blizzard program that used this message]), and 8 used statuses for SID_AUTH_ACCOUNTCREATE. [/quote] I checked pvpgn bnet protocol file just now, there are 9 used statuses for SID_CREATEACCOUNT2 (SERVER_CREATEACCTREPLY2 in pvpgn) it's only sent from D2 1.03~1.10. ;) [/quote] Note that I said used statuses. The other statuses never occur (when using Battle.net). For instance, 7 name contains adjacent punctuation is entirely superseded by 2 name contains reserved characters. To the best of my knowledge, these unused statuses have never appeared "in the wild" on Battle.net. | January 1, 2004, 8:12 PM |
Skywing | [quote author=UserLoser. link=board=17;threadid=4508;start=15#msg37926 date=1072985048] [quote author=Soar link=board=17;threadid=4508;start=15#msg37902 date=1072975295] I checked pvpgn bnet protocol file just now, there are 9 used statuses for SID_CREATEACCOUNT2 (SERVER_CREATEACCTREPLY2 in pvpgn) it's only sent from D2 1.03~1.10. ;) [/quote] And what are these 9? [/quote] 0 Success [remaining are failure codes] 1 Name blank 2 Name contains reserved characters 3 Name contains reserved words 4 Account already exists 5 (unused) - also, no mapping to SID_AUTH_ACCOUNTCREATE 6 Name too short - also mapped to SID_AUTH_ACCOUNTCREATE: no alphanumeric characters 7 (unused) Name contains adjacent punctuation 8 (unused) Name contains too much punctuation SID_AUTH_ACCOUNTCREATE statuses are converted to SID_CREATEACCOUNT2 statuses internally by Diablo II. Status 5 and any status not mentioned above result in a generic "account already exists" type error displayed to the user. | January 1, 2004, 8:22 PM |
Adron | [quote author=Kp link=board=17;threadid=4508;start=0#msg37745 date=1072888701] [quote author=Soar link=board=17;threadid=4508;start=0#msg37740 date=1072885170] in C codes, NTString = None-Terminate String[/quote] Who taught you that? I've never seen that designation. [/quote] I sometimes think of NTString as UNICODE_STRING, since that's the one that seems most native to NT... | January 2, 2004, 3:04 AM |
Soar | the 3 unused statuses are seen in D2 1.10 now (at least my friend got 2 of them some times), I think they may not work in 1.09 and lower version | January 2, 2004, 4:16 AM |
Skywing | [quote author=Soar link=board=17;threadid=4508;start=30#msg38000 date=1073016998] the 3 unused statuses are seen in D2 1.10 now (at least my friend got 2 of them some times), I think they may not work in 1.09 and lower version [/quote] I checked D2 1.10 and it behaves the same for status 5 and status 4 (and any other status not mentioned above), so it's unlikely that it's used. | January 2, 2004, 6:49 AM |