Skip to content

Instantly share code, notes, and snippets.

Frederik mozfreddyb

Block or report user

Report or block mozfreddyb

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mozfreddyb / add-ca-cert.js
Created Jul 10, 2017
privileged JS for Firefox to add a certificate as a trusted CA
View add-ca-cert.js
if (typeof Cc == "undefined") { Cc = Components.classes; }
if (typeof Cu == "undefined") { Cu = Components.utils; }
if (typeof Ci == "undefined") { Ci = Components.interfaces; }
const nsX509CertDB = ";1";
const nsIX509Cert = Ci.nsIX509Cert;
const nsIX509CertDB = Ci.nsIX509CertDB;
const certdb = Cc[nsX509CertDB].getService(nsIX509CertDB);
let certstring = `-----BEGIN CERTIFICATE-----
ttaubert / rc4.js
Last active Aug 29, 2015
RC4 in (almost) a tweet
View rc4.js
function*r(k){t=x=>(y=x%n)in s?s[y]:y;w=_=>t((s[i%n]=t(j+=f=t(i++)))+(s[j%n]=f));for(n=256,s=[i=j=0];i<n;)w(j+=k[i%k.length]);for(j=0,i=1;;)yield w()}
// A raw RC4 stream.
// Works in Firefox only (needs lots of ES6).
// 150 chars
// Usage:
for (var b of r([65,65,65])) {
View gist:10130454
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select
View local_manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<remote name="jld" fetch="" />
<remove-project name="platform_prebuilts_qemu-kernel" />
<project name="platform_prebuilts_qemu-kernel" path="prebuilts/qemu-kernel" remote="jld" revision="secure-goldfish" />
devd /
Last active Jul 12, 2016
Simple Tool to maybe rewrite extensions to be CSP compatible
#Run this on Extension Source code to make it inline-script-less
#perl <extdir>;
#where extdir is the directory with the manifest.json.
#This will make a inplace change: make a copy if you want it to work on a copy.
use strict;
use warnings;
use HTML::Parser ();
You can’t perform that action at this time.