yangyuan / hearthrock

Hearthstone® Bot Engine
https://yangyuan.github.io/hearthrock/
MIT License
258 stars 68 forks source link

Another new version: 11.1.1.24589 #61

Closed Sotam closed 5 years ago

Sotam commented 6 years ago

Hi all, there is a new version of Hearthstone. First of all I had to change the regex to determine the version.

https://github.com/yangyuan/hearthrock/blob/876cd18618cd236fee5a295651b552e750c5e3e8/src/Hearthrock.Client/Hacking/Patcher.cs#L378 Changed to:

Regex regex = new Regex("([0-9]+\\.[0-9]+\\.[0-1]+\\.[0-9]+)");

Next step is to get the newest Assembly-CSharp.dll, right? I've used HxD to find the (decrypted, it's decrypted, right?) file. Pasted it into a new file, so far no real problems.

I replaced the file in the project solution and there the trouble starts: Visual Studio complains The referenced component 'Assembly-CSharp_new' could not be found. And from the context-menu the View in Assembly Explorer isn't available and the property runtime version is empty either. So I guess I did something wrong or perhaps missed a step?

Sotam commented 6 years ago

It seems that my extracting wasn't good. I used some decrypting snippet and now it is working. But I'm not really satisfied with the decrypting method. Using memory to get the needed part seems more stable? Anyway, I'll probably going to build in the decrypting method. Still would like to know why the RAM extracting wasn't good.

Sotam commented 6 years ago

I guess this project is somewhat dead? Anyway, the extracted assembly from RAM is invalid according to VS2017 but is lets met start HS. When I use the decrypted (using some snippet-code) VS2017 accepts the assembly and also the game starts. However, the assembly is somewhat invalid. The bot nor me can play a card. It get's returned to the hand.. so if someone reads this and knows the problem, please let me know :)

yangyuan commented 6 years ago

@Sotam Hi, sorry for the late reply. Thanks for the suggestion on the regular expression, I've fixed the issue and also updated the Nuget.

Extract RAM is a very bad idea, I can tell. I shared my decrypting method in here: https://gist.github.com/yangyuan/14444ccbc08517f64b31cf24165fccf2 It's really a mess sorry about that, it's ugly but working.

This project is usually one week behind Hearthrock. I have more than one projects ongoing I have to divide the time evenly.

Sotam commented 6 years ago

Hi! Thanks for your reply. I understand. Your decryption method looks a bit different then the one I tried, I'll see if it that was my problem :)

alcsan commented 6 years ago

Does Hearthrock 0.6.4 Alpha work for anyone?

zzk0 commented 6 years ago

Another new version : "11.2.0.24769" Sotam's method works! Open the hearthstone.exe in HxD, find the similar section, copy and paste. Then replace the Assembly-CSharp.dll . modified the file "pegasus.json" version. i don't know how the checksum generated, then disabled the checksum.

Sotam commented 6 years ago

Sorry @AwesomeKnight, but my method doesn't work. Getting the proper data from HxD is not really stable, imo.

yangyuan commented 6 years ago

I've updated the Nuget will update/test project tmr.