Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lance

Pages: 1 ... 3 4 [5] 6 7 ... 9
61
Botdev / Re: [JAVA, W3XP, W3GS] Host Counter Decoding
« on: December 07, 2009, 04:03:52 pm »
Are you supposed to drop half of the digits, or are you concatenating two digits together, and then converting the pairs to 4 bytes?  I know what the character array looks like as a string, but that doesn't help much. :)

Maybe since this is the bot dev thread, there's some context I'm missing out on, but it seems that you left essential details out of the problem specification.  It seems like an easy task whatever it is you're trying to do, but it's hard to answer a question when there's something missing.

Incidentally, your code only indexes 0 - 4 of the original array.  You want to index 2*i and 2*i+1, not i and i+1, unless you're meaning to throw out some of the digits.

I am trying concatenate four pairs of two digits into bytes. In the string, two characters are meant represent one byte so I am not losing any of the digits!  :)
Unfortunately, the code above does not work:
Code: [Select]
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

EDIT:
Got it working!
Code: [Select]
byte[] processedHostCounter = new byte[4];
for(int i = 0; i < 4; i++) {
processedHostCounter[i] = (byte)Integer.parseInt(new String(new byte[] { hostCounter[i + 1], hostCounter[i] }));
}

Thanks everyone :)

62
Botdev / Re: [JAVA, W3XP] HosT Counter Decoding
« on: December 07, 2009, 11:40:06 am »
I'm not really clear on what you're asking.

Are you supposed to convert the original to an integer, then get the individual bytes within the integer?
I pretty much want to know how to turn 3130303030303030 (which as Joe mentioned, is "10000000" as a string) to a new byte[] { 1, 0, 0, 0 }

That text, converted to a string is "10000000". I imagine to split it into 4 WORDs, then swap the byte order. That'd end you up with 3031, 3030, 3030, and 3030, which are "01", "00", "00", and "00".

It would help if I had a half a clue what you're talking about, though.
I am working with a W3XP game host counter, and have changed the title to clarify this; sorry!

So, do this?
Code: [Select]
byte[] original_segment = new byte[] { /* 3130303030303030 */ };
byte[] result = new byte[4];

for(int i = 0; i < 4; i++) {
result[i] = (byte)Integer.parseInt(new String(new byte[] { ((byte)(original_segment[i + 1] >> 4)), (byte)(original_segment[i] >> 4) }));
}

Going to test it out right now.

63
Botdev / [JAVA, W3XP, W3GS] Host Counter Decoding
« on: December 06, 2009, 01:22:29 am »
DotA.For.Rest:
(char[8])3130303030303030 |text formated hexadecimal Hosting Counter (upper case)

After I get those 8 bytes, how would I go about converting them into a host counter/4-length byte array that I can send back to the host (e.g. new byte[] { 1, 0, 0, 0 })?

I have tried converting the byte array to a string, then using String.getBytes with the default, ascii, and utf-8 encodings. None of them work! :(

Thanks :)

64
JavaOp Support Archive / Re: Using local hashes
« on: December 06, 2009, 01:10:19 am »
The only thing that I can say is when you're using ROC with TFT installed, the game connects as TFT then sends a "change client" message, boiling down to, I don't think you can use TFT hashes with ROC, so changing to "w3xp" should fix it in that case.

Sorry if this is off-topic, but Battle.net doesn't actually care if you use SID_SWITCHPRODUCT. You can just log in as WAR3, even if you have W3XP hashes. Obviously, emulating client behavior as closely as possible is preferable, but I think this is a safe caveat to use since it's how D2XP logs in as D2DV, and the code is probably reused on the server.

I stand corrected.

So, how come you could get on once, but you couldn't reconnect?

I am not quite sure :-\

65
JavaOp Support Archive / Re: Using local hashes
« on: December 01, 2009, 11:11:55 pm »
My bot is no longer receiving warden packets so it does not reconnect. Problem solved for now, I guess.

What happened to warden?  ???

66
Botdev / Re: Information on W3GS data
« on: November 30, 2009, 04:00:30 pm »
Chavo: That decode method worked like a charm ;D

Camel: I have re-read about bitwise operations, and it is starting to make some sense.

Thanks guys! :)

67
Botdev / Re: Information on W3GS data
« on: November 30, 2009, 02:01:56 pm »
It seems that whatever is transcoding the raw to the output is doing it...weird.  The first byte is dropped, and the rest have 1 either added or subtracted from them and are then output.  Without code, it'll be hard to tell why your output is completely wrong.

I don't know what to make of this:
Quote from: Dota.For.Rest
                 |last Zero is not Coded - it used only for detect end of Coded data
                  |Decode is simple: all Coded data splited by 8 bytes blocks
                  |First byte of each block is first bits of 7 bytes data bit0 always 1
                  |Bit1 represents bit0 of byte1, bit2 represents bit0 of byte2 ...
                  |Left 7 bytes bit0 set to 1 for coded data

I'm new to Java and application programming in general, so sorry if it's obvious, but I just don't get it.

68
Botdev / Re: [WAR3, W3XP] Packet before W3GS_REQJOIN
« on: November 30, 2009, 02:00:23 pm »
Packet log it?

I was just about to update the thread saying never mind I'm going to packet log it  :D

I did, and found what I was looking for. Thanks :)

69
Botdev / Re: Decoding SID_GETADVLIST Data
« on: November 30, 2009, 01:02:30 pm »
To clarify for everyone else, the title of this thread is misleading.  Sarcastic is looking for information about W3GS data.  The header leads one to think that you might be able to just find the info on BnetDocs....
Changed the title  :P

70
Botdev / [WAR3, W3XP] Packet before W3GS_REQJOIN
« on: November 30, 2009, 12:10:22 pm »
How do I get battle.net to give me the IP and game port for the host of a specified private game name? I have looked everywhere for the packet and can't find it.

Thanks  :)

71
Botdev / Re: Decoding SID_GETADVLIST Data
« on: November 30, 2009, 10:38:17 am »
I wonder why you haven't asked over at vL?  Anyway, the answer is invariably a variant of Grok's DebugOuput routine.  Search "DebugOutput" at vL and you'll find billions of copies.

I don't want to stretch myself too thin; barely have a post count here :P

By decode, I mean how 0x01 becomes 02, 0x03 becomes 48 etc. I have a variant of DebugOutput provided in the JavaOP util.Buffer class which I use to view the raw buffer, but it does not show similar contents (map location and player name) though the rest of the buffer shows what I expect. I guess this specific segment of the buffer needs special decoding  :'(

The mysterious segment:
Code: [Select]
01 03 49 07 01 01 77 01 89 79 01 cb 31 57 17 4d ..I...w..y..1W.M
cb 61 71 73 5d 45 6f 77 19 6f 6d 6f 61 65 5d 45 .aqs]Eow.omoae]E
2b 6f 75 41 21 41 6d 6d 2b 73 75 61 73 73 21 77 +ouA!Amm+suass!w
c1 37 2f 37 35 2f 77 33 51 79 01 45 6f 75 41 51 .7/75/w3Qy.EouAQ
d3 75 63 2f 41 51 45 4d 99 01 01 f3 35 89 1f 71 .uc/AQEM....5..q
b9 d5 c9 41 4d 29 43 39 67 6f 6b 59 af a3 cd 9b ...AM)C9gokY....
03 6f                                            .o
Length: 98

May DebugOutput be completely different from the method in JavaOp2?  :o

72
JavaOp Support Archive / Re: Using local hashes
« on: November 30, 2009, 10:07:46 am »
To use W3X, type "w3xp" in the game client box. Apparently when I rewrote some code, I missed out on "warcraft iii: tft" in specific.

The invalid version error you're getting is stating that the hash files you're using are invalid. I can't tell you why -- that's a specific response code from Battle.net. The only thing that I can say is when you're using ROC with TFT installed, the game connects as TFT then sends a "change client" message, boiling down to, I don't think you can use TFT hashes with ROC, so changing to "w3xp" should fix it in that case.
I have been using TFT by putting "W3XP" in the game client box, but when I try without a BNLS server I get the error. I have two valid CDKeys (1 ROC and 1 TFT), and have been using only TFT the whole time.

If my hashes are invalid and they are from a live client, should I use older ones?

I also found the verbyte for the hashes to be 17, while outside sources say it's 18. I change it to 18 and still get the error, so it's something else.

73
Botdev / Information on W3GS data
« on: November 29, 2009, 11:46:51 pm »
I am trying to figure out how to decode a buffer. In the thread in the quote below, the posters seem to decode the buffer somehow. How are they decoding the buffer? (which in the first code block seems to be enc1_raw)

Thanks :)

i have some comments on the gameInfo packet.
about the encoded part.
i am very certain, as i stated in the other thread, that the encoded part starts after the 0x00 after the gamename. why?
1) in replays it starts there
2) some values tagged unknown by you do vanish...

example:
Code: [Select]
i let my encoded data start with 01034907... not with 997d01...

static const char enc1_raw[] =
{
0x01,0x03,0x49,0x07,0x01,0x01,0x7d,0x01,
0x99,0x7d,0x01,0xa3,0xdf,0x1d,0x43,0x4d,0x8b,0x61,
0x71,0x73,0x5d,0x29,0x35,0x29,0xcd,0x4d,0x6f,0x73,
0x75,0x55,0x65,0x6d,0xe9,0x71,0x6d,0x65,0x2f,0x77,
0x33,0x6d,0x89,0x01,0x47,0x6f,0x73,0x2f,0x53,0x65,
0x03,0x73,0x75,0x01,0x01
};
if we decode that, we get
Code: [Select]
02 48 06 00 00 7c 00 7c
.  H  .  .  .  |  .  |  
00 a3 df 1c 42 4d 61 70
.  .  .  .  B  M  a  p  
73 5c 28 34 29 4c 6f 73
s  \  (  4  )  L  o  s  
74 54 65 6d 70 6c 65 2e
t  T  e  m  p  l  e  .  
77 33 6d 00 46 6f 72 2e
w  3  m  .  F  o  r  .  
52 65 73 74 00 00
r  e  s  t
...

74
JavaOp Support Archive / Re: Using local hashes
« on: November 29, 2009, 04:41:45 pm »
My bot reconnects around every two minutes before warden can disconnect it. No matter what BNLS server I use, every two or three reconnects I get the invalid game version error. My big concern is (stability)? unless the cause is something else.

75
JavaOp Support Archive / Using local hashes
« on: November 29, 2009, 08:58:43 am »
How can I use local hashing? When I try to connect using local hashing, I get this:

Code: [Select]
...
[08:51:19.328] NOTICE: [BNET] Server successfully authenticated -- it's Blizzard's
[08:51:19.547] INFO: [BNET] Client token: ...
[08:51:19.585] INFO: [BNET] Version Hash: ...
[08:51:19.600] INFO: [BNET] Checksum: ...
[08:51:19.601] INFO: [BNET] CDKey owner: ...
[08:51:19.604] NOTICE: [BNET] CDKey and Version check sent.
[08:51:19.625] exceptions.InvalidVersion: [BNET] Invalid game version
[08:51:19.631] Login.getLogin(Login.java:180)
[08:51:19.632] PluginMain.processedPacket(PluginMain.java:328)
[08:51:19.633] pluginmanagers.PluginRegistration.processedIncomingPacket(PluginRegistration.java:722)
[08:51:19.634] bot.PacketThread.run(PacketThread.java:178)

I have the hashes in the .hashes folder and are up to date (from a live client).
The CDKeys are valid.
Using JavaOp 2.1.1.

BNetLogin->game is set to W3XP (which works when I use BNLS servers). If I try to use "Warcraft III: TFT" from the dropdown, I get:
Code: [Select]
[08:56:31.400] NOTICE: Bot 'PrivateBot' has been started.
[08:56:32.243] DEBUG: Entering disconnect()
[08:56:32.245] DEBUG: Entering connect()
[08:56:32.254] ALERT: [BNET] Unable to connect due to exception: exceptions.InvalidVersion: Game not found - warcraft iii: tft

I have googled around and looked in the archive but have found no solutions that don't involve BNLS (which I would like to avoid).

Pages: 1 ... 3 4 [5] 6 7 ... 9