Skip to content

Instantly share code, notes, and snippets.

@eighthave
eighthave / find-ga_trackingId.py
Created Dec 15, 2020
Scan the provided dirs for APKs, then search those APKs for the Google Firebase Analytics API Key Identifier.
View find-ga_trackingId.py
#!/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
try:
@eighthave
eighthave / screenshot2-to-clbin.sh
Created Aug 4, 2016
script to quickly take a screenshot from Android then post it to clbin.com
View screenshot2-to-clbin.sh
#!/bin/sh
cd ~/Downloads
filename=screenshot-`date '+%s'`.png
$ANDROID_HOME/tools/screenshot2 $@ $filename
echo ~/Downloads/$filename
curl -F "clbin=@$filename" https://clbin.com
View gist:6c4757f5877b88c5a586
} 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
shutdownAndLock(this);
PanicResponder.deleteAllAppData(this);
Intent uninstall = new Intent(Intent.ACTION_DELETE);
uninstall.setData(Uri.parse("package:" + getPackageName()));
startActivity(uninstall);
@eighthave
eighthave / fdroidserver.rb
Created Aug 6, 2015
Homebrew Formula for the F-Droid app repo tools aka fdroidserver
View fdroidserver.rb
class Fdroidserver < Formula
desc "Tools for creating and managing Android app repositories for F-Droid"
homepage "https://f-droid.org/"
url "https://pypi.python.org/packages/source/f/fdroidserver/fdroidserver-0.4.0.tar.gz"
sha256 "89742f2e03e082c9d185835dbb4f166dade19a0e257b247a6e0bca3b4fd9b523"
depends_on :java => "1.7"
depends_on "libmagic" => :recommended
depends_on "libyaml"
depends_on :python if MacOS.version <= :snow_leopard
@eighthave
eighthave / gist:ac32ba94618731d1fcd4
Created Feb 24, 2015
chatsecure single account auto-signs in
View gist:ac32ba94618731d1fcd4
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
View configure
#! /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 <http://bugs.gnupg.org>.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
@eighthave
eighthave / gist:c6deb99eb0198f0283f1
Created Nov 10, 2014
limun.org/Gajim <--> jabber.org/ChatSecure session
View gist:c6deb99eb0198f0283f1
OtrChatManager V getSessionStatus: gptest@jabber.org/ChatSecure-20bbf32c gptest@limun.org/Gajim
V getSessionId: gptest@jabber.org/ChatSecure-20bbf32c gptest@limun.org/Gajim
V getSessionId: gptest@jabber.org/ChatSecure-20bbf32c gptest@limun.org/Gajim
OtrChatListener V onIncomingMessage: ?OTR:AAIDAAAAAAEAAAABAAAAwEKxAWhVGJrEePyiZBQxfjStAGWG0eK+uvOHTm3a5k8Osd1grUdz9m+V40nkPV29l+5K/M4jyAG00SlXiY4Ds/WpYfyzupmt0PZcOf6o60HClTqmln4MhmFWML1AuxEc+JYELU0j
lNIlMso89SgzELM1+UIy637d7RzcBuJQxVB+OzIthHv1HrgwGShPhICyxmfY7mpFDYTzK+rZzNhUN9S/SpLvd/bL6K5MncL7iXhnXPbHraQU/IJg70S+6AJriAAAAAAAAAAQAAAAC5tfjzhKRFThQU2B4+muwdr5bgiYpJ7jtMceDHxnWecA
AAAA.
OtrChatManager V getSessionId: gptest@jabber.org/ChatSecure-20bbf32c gptest@limun.org/Gajim
V getSessionStatus: gptest@jabber.org/ChatSecure-20bbf32c gptest@limun.org/Gajim
V decryptMessage: gptest@jabber.
View gist:7a529585159a24051d64
OtrChatManager V setPolicy: 59
HockeyApp D Looking for exceptions in: /data/data/info.guardianproject.otr.app.im/files
D Current handler class = net.hockeyapp.android.ExceptionHandler
OtrChatManager V getSessionId: gptest@jabber.org/ChatSecure-730b7561 gptest@limun.org
V getSessionId: gptest@jabber.org/ChatSecure-730b7561 gptest@limun.org
V getSessionStatus: gptest@jabber.org/ChatSecure-730b7561 gptest@limun.org
OtrChatManager V getSessionId: gptest@jabber.org/ChatSecure-730b7561 gptest@limun.org
V getSessionId: gptest@jabber.org/ChatSecure-730b7561 gptest@limun.org
V getSessionStatus: gptest@jabber.org/ChatSecure-730b7561 gptest@limun.org
V getSessionId: gptest@jabber.org/ChatSecure-730b7561 gptest@limun.org
@eighthave
eighthave / find-https-debian-archives.py
Last active Dec 25, 2020
Script to find official Debian mirrors that support HTTPS
View find-https-debian-archives.py
#!/usr/bin/env python3
import urllib.request
import re
import ssl
import sys
# # find generic mirrors
mirrors = urllib.request.urlopen('http://www.debian.org/mirror/list')
https = []
@eighthave
eighthave / gist:5777441
Created Jun 13, 2013
I get email from accounts, then use that to look up display name
View gist:5777441
String email = null;
// get email address from first system account that looks like an email
AccountManager manager = AccountManager.get(this);
for (Account account : manager.getAccounts())
if (account.name.contains("@") && account.name.contains(".")) {
email = account.name;
EditText keyEmail = (EditText) findViewById(R.id.keyEmail);
keyEmail.setText(email);
break;
You can’t perform that action at this time.