Skip to content

Instantly share code, notes, and snippets.

@zb3
Created August 22, 2016 08:45
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save zb3/cfbb94e45d9318adcb63051a66a586ea to your computer and use it in GitHub Desktop.
Save zb3/cfbb94e45d9318adcb63051a66a586ea to your computer and use it in GitHub Desktop.
Crack firefox so that you can run unsigned extensions on linux, without recompiling firefox
#cracks for open source software are always cool....
#requires root privileges to replace omni.ja
#needs to be reapplied on reinstall
#you'll also need to set xpinstall.signatures.required to false
#and restart your browser
#tested on arch with FF48
OMNI_PATH=${1:-/usr/lib/firefox}
#unpack
cd $OMNI_PATH
unzip omni.ja -d omni_tmp
cd omni_tmp
#set AppConstants.MOZ_REQUIRE_SIGNING to false
sed -i -e 's/MOZ_REQUIRE_SIGNING:$/MOZ_REQUIRE_SIGNING: false \&\&/g' modules/AppConstants.jsm
#set AddonConstants.MOZ_REQUIRE_SIGNING to undefined
sed -i -e 's/this, "REQUIRE_SIGNING"/this, "REQUIRE_SINGING"/g' modules/addons/AddonConstants.jsm
#remove cache
rm jsloader/resource/gre/modules/AppConstants.jsm
rm jsloader/resource/gre/modules/addons/AddonConstants.jsm
#repack
zip -qr9XD omni.ja *
cp omni.ja ..
cd ..
rm -r omni_tmp
@zb3
Copy link
Author

zb3 commented Aug 22, 2016

I am currently using my own unsigned addon, so I will update this for new versions of FF, providing they don't move the verification code to CPP side, coz then the only way to disable this crap will be to recompile the package....

@TheLoneWolfling
Copy link

coz then the only way to disable this crap will be to recompile the package

Or bin-patch, although that's brittle.

Ultimately, as long as the user has control over the code they run, they have control over the code they run.

@TheLoneWolfling
Copy link

coz then the only way to disable this crap will be to recompile the package

Or bin-patch, although that's brittle.

Ultimately, as long as the user has control over the code they run, they have control over the code they run.

@naddika
Copy link

naddika commented May 25, 2023

I need to recompile FF because of other thing anyway. So how will I do "firefox_crack_linux" thing before recompilation?

@zb3
Copy link
Author

zb3 commented Jun 3, 2023

Just grep MOZ_REQUIRE_SIGNING and set it to false somewhere. This script is no longer supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment