• Welcome to Valhalla Legends Archive.
 

ipbans on 0x50 c->s?

Started by fatalnix, July 20, 2009, 12:57 AM

Previous topic - Next topic

fatalnix

I am having an issue getting an 0x50 back from battle.net, I'm questioning if I keep getting banned or not, but here's my TCP packet:


0000  00 1e 2a dc 37 10 00 15  58 28 47 c5 08 00 45 00   ..*.7... X(G...E.
0010  00 6e c9 69 40 00 40 06  a5 fb c0 a8 00 0b 3f f0   .n.i@.@. ......?.
0020  ca 81 96 5f 17 e0 ec 87  4c c2 17 9d 44 81 80 18   ..._.... L...D...
0030  00 5c cb 85 00 00 01 01  08 0a 02 29 85 bf 07 ce   .\...... ...)....
0040  f1 e9 ff 50 36 00 00 00  00 00 36 38 58 49 52 41   ...P6... ..68XIRA
0050  54 53 d3 00 00 00 00 00  00 00 00 00 00 00 00 00   TS...... ........
0060  00 00 00 00 00 00 00 00  00 00 55 53 41 00 55 6e   ........ ..USA.Un
0070  69 74 65 64 20 53 74 61  74 65 73 00               ited Sta tes.   


If you need to see my code let me know.
thanks in advance!

Hdx

ff 50 36 00 .P6. - Header
00 00 00 00 .... - Protocol
36 38 58 49 68XI - Platform
52 41 54 53 RATS - Product
d3 00 00 00 .... - Verbyte
00 00 00 00 .... - Language
00 00 00 00 .... - Local IP
00 00 00 00 .... - Time Zone
00 00 00 00 .... - Locale ID
00 00 00 00 .... - Language Id
55 53 41 00 USA. - Country Abreviation
55 6e 69 74 65 64 20 53 74 61 74 65 73 00 United States. - Country

I can't understand you, speak a real language!

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

fatalnix

What I am saying is that I think there is something wrong with that packet but I'm not sure what. I am not getting an 0x50 back. I have put it together like this:

insert32(0);
insert32(PLAT_IX86);
insert32(GAME_STAR);
insert32(0xD3);
insert32(0);
insert32(0);
insert32(0);
insert32(0);
insert32(0);
insertNTString("USA");
insertNTString("United States");


Hdx

Quote from: Hdx on July 20, 2009, 04:52 AM
Quoteff 50 36 00 .P6. - Header
00 00 00 00 .... - Protocol
36 38 58 49 68XI - Platform
52 41 54 53 RATS - Product
d3 00 00 00 .... - Verbyte
00 00 00 00 .... - Language
00 00 00 00 .... - Local IP
00 00 00 00 .... - Time Zone
00 00 00 00 .... - Locale ID
00 00 00 00 .... - Language Id
55 53 41 00 USA. - Country Abreviation
55 6e 69 74 65 64 20 53 74 61 74 65 73 00 United States. - Country
I can't understand you, speak a real language!
If you don't get it after this, I think im going to have to smack you!

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

fatalnix

I think I understand now. my insert32 must be screwed up? as if I am sending too much data?

ThePro

Quote from: Hdx on July 20, 2009, 08:21 AM
Quote from: Hdx on July 20, 2009, 04:52 AM
Quoteff 50 36 00 .P6. - Header
00 00 00 00 .... - Protocol
36 38 58 49 68XI - Platform
52 41 54 53 RATS - Product
d3 00 00 00 .... - Verbyte
00 00 00 00 .... - Language
00 00 00 00 .... - Local IP
00 00 00 00 .... - Time Zone
00 00 00 00 .... - Locale ID
00 00 00 00 .... - Language Id
55 53 41 00 USA. - Country Abreviation
55 6e 69 74 65 64 20 53 74 61 74 65 73 00 United States. - Country
I can't understand you, speak a real language!
If you don't get it after this, I think im going to have to smack you!

This is okay, language can be 0x00.

Hdx

#6
Quote from: ThePro on July 20, 2009, 08:32 AM
Quote from: Hdx on July 20, 2009, 08:21 AM
Quote from: Hdx on July 20, 2009, 04:52 AM
Quoteff 50 36 00 .P6. - Header
00 00 00 00 .... - Protocol
36 38 58 49 68XI - Platform
52 41 54 53 RATS - Product
d3 00 00 00 .... - Verbyte
00 00 00 00 .... - Language
00 00 00 00 .... - Local IP
00 00 00 00 .... - Time Zone
00 00 00 00 .... - Locale ID
00 00 00 00 .... - Language Id
55 53 41 00 USA. - Country Abreviation
55 6e 69 74 65 64 20 53 74 61 74 65 73 00 United States. - Country
I can't understand you, speak a real language!
If you don't get it after this, I think im going to have to smack you!

This is okay, language can be 0x00.
It can? Every time I set it to zero, oddly enough, I get ip banned for about 15 minuets.

I *guess* the only other issue is the protocol byte then. (It doesn't show up in his packet log)

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

fatalnix

The protocol byte should be different? I read from bnetdocs it should be 0.

Hdx

#8
Quote from: fatalnix on July 20, 2009, 08:43 AMThe protocol byte should be different? I read from bnetdocs it should be 0.
Are you sending a Chr(1) over the socket before you send 0x50?
You need to select which protocol you're using. This is called the protocol byte.

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

fatalnix

I'm sending 0x01 directly to the socket yes, would that make a difference?
print $bnet 0x01;


Hdx

Quote from: fatalnix on July 20, 2009, 08:53 AMI'm sending 0x01 directly to the socket yes, would that make a difference?print $bnet 0x01;
OHHHHHHHH I'm an idiot, your header is wrong, you're not including the length of the header in your length word.
It should be 0x003A not 0x0036 as you have it u.u all nighters suck!

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

fatalnix

Really? That's odd, I'm using length($buffer) + 4

Hdx

Quote from: fatalnix on July 20, 2009, 08:59 AM
Really? That's odd, I'm using length($buffer) + 4

Quoteff 50 36 00 .P6. - 4
00 00 00 00 .... - 8
36 38 58 49 68XI - 12
52 41 54 53 RATS - 16
d3 00 00 00 .... - 20
00 00 00 00 .... - 24
00 00 00 00 .... - 28
00 00 00 00 .... - 32
00 00 00 00 .... - 36
00 00 00 00 .... - 40
55 53 41 00 USA. - 44
55 6e 69 74 65 64 20 53 74 61 74 65 73 00 United States. - 58

58 = 0x3A
0x36 = 54

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status

fatalnix

#13
I'll change it to +8 and see what happens.

Edit:
You are a genius. Somehow I took out the +4.
Unfortunately I'm still having problems. However I am now getting 3a in the packet after 0x50

Hdx

Still getting ipbanned?
Post a full packet log. (of the entire connection)
Also, try setting the language to a real value.

Proud host of the JBLS server www.JBLS.org.
JBLS.org Status:
JBLS/BNLS Server Status