goatcorp / FFXIVQuickLauncher

Custom launcher for FFXIV
https://goatcorp.github.io/
GNU General Public License v3.0
2.75k stars 327 forks source link

Implement Dalamud hashes.json #481

Open goaaats opened 3 years ago

goaaats commented 3 years ago

Dalamud has been shipping a hashes.json file for a while now. XL should verify them.

TheGuyDanish commented 2 years ago

I've made some initial efforts towards this in https://github.com/TheGuyDanish/FFXIVQuickLauncher/commit/b5921f5c57e4f00bd470d3adc9d04e3d796f2fe9. (Go easy on me, I'm a Python guy normally, I just know a little C#, so I don't expect this to be up to your code standards)

I've tested it by setting a breakpoint after the Dalamud download and editing one of the files to fail the check. As expected, when the game is launched, it returns the "Failed to launch Dalamud" error. (Note that in this commit, the return statement is commented as I was testing something, but when uncommented, it runs as explained)

Hopefully this can be of some use. The loop takes a negligible amount of time to run through on my device (i5-9600k). This entire function could be improved further by grabbing hashes.json from Github directly, rather than the one in the newly-downloaded file, as doing the check against a local file admittedly does nothing against a proper MITM attack.