Skip to content

Instantly share code, notes, and snippets.

eighthave /
Created May 25, 2021 15:33
list all known Android NDK versions as seen by fdroid/android-sdk-transparency-log
import re, requests
NDK_VERSION_NUMBER_REGEX = re.compile(r'[1-9][0-9]*\.[0-9]+\.[0-9]{7}(?:-[a-z0-9]+)?')
NDK_VERSION_REGEX = re.compile(r"""ndkVersion\s*[= ]\s*['"]([1-9][0-9]*\.[0-9]+\.[0-9]{7}(?:-[a-z0-9]+)?)["']""")
r = requests.get('')
data = r.json()
for url, entries in data.items():
for d in entries:
eighthave /
Created December 15, 2020 20:29
Scan the provided dirs for APKs, then search those APKs for the Google Firebase Analytics API Key Identifier.
#!/usr/bin/env python3
# Scan the provided dirs for APKs, then search those APKs for the
# Google Firebase Analytics API Key Identifier.
import os
import sys
import zipfile
from androguard.core.bytecodes.axml import AXMLPrinter
eighthave /
Created August 4, 2016 12:42
script to quickly take a screenshot from Android then post it to
cd ~/Downloads
filename=screenshot-`date '+%s'`.png
$ANDROID_HOME/tools/screenshot2 $@ $filename
echo ~/Downloads/$filename
curl -F "clbin=@$filename"
eighthave / gist:6c4757f5877b88c5a586
Created January 5, 2016 19:17
panic response in zom
} else if (Panic.isTriggerIntent(intent)) {
if (PanicResponder.receivedTriggerFromConnectedApp(this)) {
if (Preferences.uninstallApp()) {
Log.i(TAG, "uninstallApp");
// lock and delete first for rapid response, then uninstall
Intent uninstall = new Intent(Intent.ACTION_DELETE);
uninstall.setData(Uri.parse("package:" + getPackageName()));
eighthave / fdroidserver.rb
Created August 6, 2015 12:29
Homebrew Formula for the F-Droid app repo tools aka fdroidserver
class Fdroidserver < Formula
desc "Tools for creating and managing Android app repositories for F-Droid"
homepage ""
url ""
sha256 "89742f2e03e082c9d185835dbb4f166dade19a0e257b247a6e0bca3b4fd9b523"
depends_on :java => "1.7"
depends_on "libmagic" => :recommended
depends_on "libyaml"
depends_on :python if MacOS.version <= :snow_leopard
eighthave / gist:ac32ba94618731d1fcd4
Created February 24, 2015 16:42
chatsecure single account auto-signs in
WelcomeActivity I doOnResume
I accountsSignedIn
I accountsSignedIn: gptest
I isSignedIn gptest OFFLINE
I accountsAvailable
I accountsAvailable: gptest
I accountsConfigured: gptest
I doOnResume countSignedIn 0 countAvailable 1 countConfigured 1
SignInHelper I setSignInListener
WelcomeActivity I signInAll
eighthave / configure
Created February 2, 2015 18:19
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for gnupg 2.1.1-unknown.
# Report bugs to <>.
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
eighthave / gist:c6deb99eb0198f0283f1
Created November 10, 2014 22:04 <--> session
OtrChatManager V getSessionStatus:
V getSessionId:
V getSessionId:
OtrChatListener V onIncomingMessage: ?OTR:AAIDAAAAAAEAAAABAAAAwEKxAWhVGJrEePyiZBQxfjStAGWG0eK+uvOHTm3a5k8Osd1grUdz9m+V40nkPV29l+5K/M4jyAG00SlXiY4Ds/WpYfyzupmt0PZcOf6o60HClTqmln4MhmFWML1AuxEc+JYELU0j
OtrChatManager V getSessionId:
V getSessionStatus:
V decryptMessage: gptest@jabber.
eighthave / gist:7a529585159a24051d64
Created October 29, 2014 00:03
bad OTR session log
OtrChatManager V setPolicy: 59
HockeyApp D Looking for exceptions in: /data/data/
D Current handler class =
OtrChatManager V getSessionId:
V getSessionId:
V getSessionStatus:
OtrChatManager V getSessionId:
V getSessionId:
V getSessionStatus:
V getSessionId:
eighthave /
Last active May 26, 2024 03:45
Script to find official Debian mirrors that support HTTPS
#!/usr/bin/env python3
import urllib.request
import re
import ssl
import sys
# # find generic mirrors
mirrors = urllib.request.urlopen('')
https = []