Author | Message | Time |
---|---|---|
ILurker | someone please tell me how the hell i find the ping, and other stuff [code] Figure 1.1 RECV-> 0000 FF 0F 3D 00 01 00 00 00 00 00 00 00 C5 01 00 00 ..=............. RECV-> 0010 00 00 00 00 0D F0 AD BA 0D F0 AD BA 53 61 72 63 ............Sarc RECV-> 0020 61 73 74 69 63 00 52 41 54 53 20 30 20 30 20 30 astic.RATS 0 0 0 RECV-> 0030 20 31 20 30 20 30 20 30 20 30 20 30 00 1 0 0 0 0 0. [/code] user's flags is 0x00000000, ping is 453, account is "Sarcastic", and statstring is "RATS 0 0 0 1 0 0 0 0 0". | March 10, 2003, 10:06 PM |
St0rm.iD | Instead of giving you the answer (since I don't know it ;)), I suggest doing an experiment. Look at a CHAT client's packet and record it. Then look at a low ping client's packet, and a high ping one's (in SC). Compare and see which dword/word/whatever it is. | March 10, 2003, 10:40 PM |
Noodlez | Packet ID: 0x0F Direction: Server -> Client (Recieved) Format: (DWORD) Event ID (DWORD) User's Flags (DWORD) Ping (DWORD) IP Address (Defunct) (DWORD) Account number (Defunct) (DWORD) Registration Authority (Defunct) (STRING) Username (STRING) Text | March 10, 2003, 10:47 PM |
St0rm.iD | Screw you n00dz ;) | March 10, 2003, 10:48 PM |
ILurker | wtf are dwords and strings, and where in the packet do i look to find them? i mean like which (numbers?/lines?) | March 10, 2003, 11:30 PM |
MesiaH | ok here i go again, i did this once, but since nobody bothers to SEARCH, ill do it again. Bytes - appear in format "00" in a packet log, this is the equivilant as 1 character in a string. Words - appear in format "00 00" in a packet log, this is equivilant as 2 characters in a string. DWords - appear in format "00 00 00 00" in a packet log, this is equivilant as 4 characters in a string. QWords - appear in format "00 00 00 00 00 00 00 00" in a packet log, this is equivilant as 8 characters in a string. NTString (Null Terminated String) - appears as plain text, with a null byte at the end "00". String - appears as plain text. When you read a packet log, your reading it in Hex, which makes it easier to distinguish then reading it as plain strings, because if you look at a word or dword in string, it can appear as any array of characters, but have a more meaningful use than that. [code] Figure 1.1 RECV-> 0000 FF 0F 3D 00 01 00 00 00 00 00 00 00 C5 01 00 00 ..=............. RECV-> 0010 00 00 00 00 0D F0 AD BA 0D F0 AD BA 53 61 72 63 ............Sarc RECV-> 0020 61 73 74 69 63 00 52 41 54 53 20 30 20 30 20 30 astic.RATS 0 0 0 RECV-> 0030 20 31 20 30 20 30 20 30 20 30 20 30 00 1 0 0 0 0 0. [/code] user's flags is 0x00000000, ping is 453, account is "Sarcastic", and statstring is "RATS 0 0 0 1 0 0 0 0 0". the ping is the third dword in the packet, as noodlez said, but your viewing it in hex, so you wont just see "453", you have to take that dword in hex, and conver it to decimal: [code] 1st dword = 01 00 00 00 2nd dword = 00 00 00 00 3rd dword = C5 01 00 00 [/code] If you convert 1C5 from hex into decimal, you will get 453, and that is the users ping. Can we get something like this on bnetdocs or botdev site or something? | March 11, 2003, 12:27 AM |
Noodlez | mesiah, i dont think that belongs on bnet docs. by making a binary bot it's assumed you have that knowledge... wow, isnt ILurker the one who called me a vb "n00b" and said i shold stop programming? but, to follow the rules i'll help you, despite how much i hate you. pos = 1 mid(data,pos,4) 'would extract the first dword pos = pos + 4 'moving on to the next dword mid(data,pos,4) pos = pos + 4 'to extract a string you would continue where you left off 'and stop at a null string = mid(data,pos, instr(mid(data,pos)-1,vbnullchar)) 'the -1 is because you don't want the null to be part of your string pos = pos + len(string) + 1 | March 11, 2003, 1:40 AM |
Camel | [quote]...your reading it in Hex...[/quote] you're [quote]mesiah, i dont think that belongs on bnet docs. by making a binary bot it's assumed you have that knowledge... wow, isnt ILurker the one who called me a vb "n00b" and said i shold stop programming? but, to follow the rules i'll help you, despite how much i hate you. pos = 1 mid(data,pos,4) 'would extract the first dword pos = pos + 4 'moving on to the next dword mid(data,pos,4) pos = pos + 4 'to extract a string you would continue where you left off 'and stop at a null string = mid(data,pos, instr(mid(data,pos)-1,vbnullchar)) 'the -1 is because you don't want the null to be part of your string pos = pos + len(string) + 1 [/quote] if you want to be ubernewbish, you you be so lazy as to write an 'extract' string...using globally defined variables, of course... 8) | March 11, 2003, 8:43 AM |
Arta | Small nitpicky correction: [quote]String - appears as plain text. [/quote] This is false. BNCS does not use any such type. Data that appears to be a non-terminated string is always 4 bytes long - they are DWORDS that just happen to look like strings. | March 11, 2003, 10:12 AM |
ILurker | [quote] wow, isnt ILurker the one who called me a vb "n00b" and said i shold stop programming? [/quote] I dont recall ever saying that | March 11, 2003, 5:02 PM |
St0rm.iD | For christ's sake...before you post: 1) Use the forum's search 2) Use bnetdocs 3) Use google | March 11, 2003, 7:47 PM |
Noodlez | [quote] I dont recall ever saying that [/quote] i'd look through your old posts, but you deleted them after i proved you were an idiot | March 11, 2003, 11:28 PM |
MesiaH | yoni, i was just pointing out what it is in general, not limiting it to the use of BNCS, otherwise i wouldnt have added the definition of a QWord :-P | March 17, 2003, 12:05 AM |
Yoni | [quote]yoni,[/quote] huh? I didn't even reply in this thread (until now) | March 17, 2003, 8:06 AM |
MrRaza | Maybe it got deleted... ;) | March 17, 2003, 8:51 AM |
MesiaH | OOPS!!! hahaha i meant arta :-P | March 17, 2003, 12:14 PM |
Arta | lol :) | March 17, 2003, 6:57 PM |