GooseMod / OpenAsar

Open-source alternative of Discord desktop's app.asar
https://openasar.dev
GNU Affero General Public License v3.0
2.45k stars 63 forks source link

Patching krisp module #121

Open surfaceflinger opened 1 year ago

surfaceflinger commented 1 year ago

discord_krisp.node has a signature check that verifies if the Discord executable has been modified. This prevents Krisp from being loaded if Discord executable has been for example stripped in repackaging process.

Workaround for that is here https://github.com/NixOS/nixpkgs/issues/195512#issuecomment-1320781446 Perhaps OpenAsar could somehow try to patch krisp after every update? I feel like this might be out of scope though.

he3als commented 1 year ago

Would be useful for the AUR packages for Discord using the system electron as well.

CanadaHonk commented 1 year ago

I have made this for Mu already (automated) fwiw. Might ship as separate patch/project?

surfaceflinger commented 1 year ago

Do whatever you think is better :)

My friend came up with this solution but I guess this will break on updates

xxd -p -c 0 discord_krisp.node | sed -E 's/(4889dfe8........85c0)745c/\19090/' | xxd -p -r -c 0 >discord_krisp_patched.node