Skip to content

Instantly share code, notes, and snippets.

mtigas /
Last active Apr 10, 2021
[macos] homebrew-installed signal w/v2 group support (fixes libzkgroup warning)
#!/usr/bin/env bash
set -e
set -x
brew install signal-cli || brew upgrade signal-cli
SIGNAL_LIBEXEC_LIBDIR="`brew --prefix signal-cli`/libexec/lib"
# zkgroup-java*.jar --- remove the linux x86_64 bundled lib
mtigas /
Last active May 21, 2021
experiments with using v3 onions with client auth (as of tor 0.3.5.X)
# needs openssl 1.1+
# needs `basez`
# (but something else that decodes the base64 and re-encodes the raw key bytes
# to base32 is probably fine too)
##### generate a key
openssl genpkey -algorithm x25519 -out /tmp/k1.prv.pem
mtigas /
Last active Jan 6, 2018
some notes about meltdown & spectre patches

(originally from a tweet thread: )

updated january 5, 2018; 12:47 US Eastern Time

ok here's a rough list of links i have collected about patches for meltdown / spectre , that i sort of compiled for my own reference but figure others might want. (info as of this morning, january 5. might have mistakes, use at own risk, etc)

MacOS High Sierra 10.13.2+, Sierra 2017-002 security update, and El Capitan 2017-005 security update mitigate meltdown:

mtigas / 0 ProPublica Tor hidden service
Last active Jun 18, 2021
Configuration for ProPublica’s Tor hidden service proxy.
View 0 ProPublica Tor hidden service

These files contain the base configuration for ProPublica’s Tor hidden service mirror.

Of note:

  • We're using the nginx "subs_filter" and "headers more" modules to allow us to rewrite content and update headers, so that we can convert clearnet links into onion links, where possible.

  • Based on feedback we've received, we're using Unix sockets (instead of a TCP port) where nginx listens internally for the inbound connection from Tor. This ensures that a firewall misconfiguration can't expose the site running in nginx, which is likely overkill for an already-public (clearnet) website; this may also slightly improve performance and reduce socket overhead, however.

    If you try doing this and have issues using sudo service nginx restart due to leftover connections using the socket, you may have to nuke the previous sockets before starting a new nginx process:

mtigas /
Last active Jun 30, 2021
Example code for running a (HTTP/HTTPS) Tor hidden service supporting subdomains.

The following files show an example of how to create subdomains for onion site hidden services. (This hasn't been tested for hidden services for anything other than HTTP/HTTPS.)

(You might also want to read our blog post about ProPublica’s Tor hidden service, including a tutorial and notes on running a hidden service: )

In general, this works (maybe just in recent Tor clients) because Tor will handle the connection to www.xxxxxxxxxxxxxxxx.onion as a connection to xxxxxxxxxxxxxxxx.onion. The encapsulated HTTP/HTTPS connection contains the subdomain in the Host: header (and in the case of HTTPS, the SNI

mtigas / gpg.conf
Last active Apr 7, 2016
hide your PGP version & other info
View gpg.conf
# Hide your PGP version & other PGP version metadata with these two config lines.
# This line hides the "Version: GnuPG vX.XX.XX" line
# This line hides the "Comment: XXXXX" lines
# NOTE if you are using Thunderbird+Enigmail you probably need to set this again in
# the Enigmail->Preference settings:
View gist:9622e039ef53b85ae379
mtigas / gist:25d680ccea78ad7db37a
Last active Aug 29, 2015
Links to my slides & notes & maybe other stuff from the CryptoPartyNYC: Journalist Edition shindig, December 8, 2014.
View gist:25d680ccea78ad7db37a
mtigas / 1-tls
Last active Mar 5, 2016
Some PGP-signed verification for various ProPublica TLS & Tor hidden service identities.
View 1-tls
Hash: SHA512
The following are the SSL certificate fingerprints for the
following servers as of 2016-03-05.
CN or SAN:
Note: this domain is now served via the Fastly CDN, relying on shared SSL
certificates. The domain should be listed as a Subject
Alternative Name on the certificate served by the CDN endpoint.
mtigas / default.json
Created Jul 9, 2014
Examples of the three output formats for the Nonprofit Explorer API: default mode, "output=flat", and "output=noorg". See
View default.json
/* Example of "output=flat" format.
* */
"total_results": 2,
"filings": [
"tax_prd": 201212,
"tax_prd_yr": 2012,
"formtype": 0,
"pdf_url": "",