Open goaaats opened 3 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.
Dalamud has been shipping a hashes.json file for a while now. XL should verify them.