Skip to content

Instantly share code, notes, and snippets.

View abeluck's full-sized avatar

Abel Luck abeluck

View GitHub Profile
@abeluck
abeluck / USAGE.md
Last active February 15, 2019 08:07
Ansible playbook for updating apt securely (CVE-2019-3462)

This only works on debian stretch (stable)

gpg --verify check-apt-update.sh.asc
ansible-playbook upgrade-apt.yml -i <YOURINV>

Thanks to @eighthave for original script.

Ref:

sending 57f56c83-7b4d-4fb4-b631-3f85a1cc787b +55555555555 test
GET https://textsecure-service-staging.whispersystems.org/v2/keys/+55555555555/1
GET https://textsecure-service-staging.whispersystems.org/v2/keys/+55555555555/1 200 Success
Trying to get session for identifier: +55555555555.1
Saving new identity...
Trying to get session for identifier: +55555555555.1
PUT https://textsecure-service-staging.whispersystems.org/v1/messages/+55555555555
PUT https://textsecure-service-staging.whispersystems.org/v1/messages/+55555555555 409 Error
{ successfulNumbers: [],
errors:
@abeluck
abeluck / SignalProtocolStore.js
Created November 1, 2018 13:24
SignalProtocolStore interface
function SignalProtocolStore(path) {
}
SignalProtocolStore.prototype = {
Direction: {
SENDING: 1,
RECEIVING: 2,
},
// create a random group id that we haven't seen before.
defaults d-xmpp
log global
mode tcp
option redispatch
option tcplog
option tcpka
option clitcpka
option srvtcpka
timeout connect 5s

Keybase proof

I hereby claim:

  • I am abeluck on github.
  • I am abelxluck (https://keybase.io/abelxluck) on keybase.
  • I have a public key ASAXHrXl-Z07odFRgipNht7jtPUi4CrF9jpo1wATItzxyQo

To claim this, I am signing this object:

@abeluck
abeluck / gist:5777275
Last active December 18, 2015 11:39
get all contacts with email
/**
* Get all contacts
* @return
*/
private Cursor getContacts()
{
String[] PROJECTION = new String[] {
ContactsContract.RawContacts._ID,
ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.Contacts.PHOTO_ID,
#!/bin/bash
# we must use the same support lib jar in all the dependencies
good_jar="app/libs/android-support-v4.jar"
# paths to libraries that need android-support
# all these libs depend on android-support-v4.jar
readarray <<END
external/HoloEverywhere/contrib/ActionBarSherlock/actionbarsherlock
END
@abeluck
abeluck / tlspretense-vpn.sh
Created May 31, 2013 19:45
ipsec VPN setup script for Ubuntu >= 12.04
#!/bin/sh
#
# DO NOT RUN THIS SCRIPT ON YOUR COMPUTER
#
# This script installs a VPN on server with Ubuntu >= 12.04
#
# Based on voodoo-vpn.sh
# Copyright Thomas Sarlandie 2012
# See http://www.sarfata.org/posts/setting-up-an-amazon-vpn-server.md
# This work is licensed under the Creative Commons Attribution-ShareAlike 3.0
@abeluck
abeluck / netcipher-test-results.txt
Created May 31, 2013 17:25
Testing NetCipher against tlspretense
Alias Description P/F Expected Actual Start Time Stop Time
---------------- ---------------- ---- -------- -------- ---------- ----------
baseline Baseline Happy T Pass connecte sentdata 2013-05-31 17:20:50 +0000 2013-05-31 17:20:59 +0000
wrongcname Wrong CNAME Pass rejected connecte 2013-05-31 17:20:59 +0000 2013-05-31 17:21:22 +0000
parentcname Parent domain's Pass rejected connecte 2013-05-31 17:21:22 +0000 2013-05-31 17:21:32 +0000
nullincname Null character i Pass rejected connecte 2013-05-31 17:21:32 +0000 2013-05-31 17:21:38 +0000
happysubjectaltn Hostname is a dn Pass connecte sentdata 2013-05-31 17:21:38 +0000 2013-05-31 17:21:45 +0000
happysubjectaltn hostname only a Pass connecte sentdata 2013-05-31 17:21:45 +0000 2013-05-31 17:22:08 +0000
wrongsubjectaltn hostname in neit Pass rejected connecte 2013-05-31 17:22:08 +0000 2013-05-31 17:22:54 +0000
wrongsubjectaltn hostname in subj Fail rejected sentdata 2013-05-31 17:22:54 +0000 2013-05-31 17:23:01
-----BEGIN CERTIFICATE-----
MIIDJTCCAg2gAwIBAgIECy0y7TANBgkqhkiG9w0BAQUFADAiMQswCQYDVQQGEwJV
UzETMBEGA1UEAwwKVHJ1c3RlZCBDQTAeFw0xMjEwMDUyMjIwMjFaFw0xMzEwMDUy
MjIwMjFaMCIxCzAJBgNVBAYTAlVTMRMwEQYDVQQDDApUcnVzdGVkIENBMIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6clG32L98j4S9CqddFeup+NyxZmd
SPuEqJpIJHPQn/oGDmqXg8qmDr+DayAKa2ZHVD0+p0ymBJ74kZlFg6apcE55WWet
VfE6L491zfAyIqgVET//OPmDd0pgiBo78NXgwVoThMZ/79/fa0BddV02xqqLNuD5
0lXYB918wEoN909y7kOtldcqSL0N8Ts0SHxXrT3zmh+t2Oz007khsq99W50VrYO+
qzmeUpf1lJopFwRkBpkw1JoXwUL36Kfzqp0KgjEcgdxJU2DsfDIIcqcZEkCFEU9x
dkaEq6pIAVT4Qegqb7oeLbMEyvRc253cMd5PkjITMa4DgbBeWrrm1QFm7wIDAQAB