Skip to content

Instantly share code, notes, and snippets.

@Happy-Ferret
Forked from zb3/firefox_crack_linux.sh
Created December 2, 2017 15:08
Show Gist options
  • Save Happy-Ferret/56ec1e6d5ef1dedb20f1b6d360a2df1d to your computer and use it in GitHub Desktop.
Save Happy-Ferret/56ec1e6d5ef1dedb20f1b6d360a2df1d 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment