Skip to content

Instantly share code, notes, and snippets.

฿tcDrak btcdrak

Block or report user

Report or block btcdrak

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
View 0xD5566241A0295FA9
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQINBFfJ8J8BEADFqS5Xda1L51ntH2NAyQuvdt/kIib0dnt/e06wuoFjBXV1MRG+
WOCaX4fMqN8LPry9GM+0CbqHYTkWjqD58MzgqgcmnZwwliHI7DHxw3+76eYxoF+J
S5ln1C6XnBJd6LNp4crfKwCd6SAzt5m94YIutABkQbnEZlOpSdc6H7A+4boToZus
hrrHc1PMfzwGHIdU3Hcge9gWiB2wWI4lbN0Qqyb3FXD1U6a5LOBsiw2+aiuivHHo
it+HcoewLHd2F0BBLMygAOCsjJhnuX2T3Yf0cHJIKyOF2U/KrEPNYH02AMe26BaW
/3x9uX14BkIgXSvUXYeX+utsiRp8ozuKqvn5BumjBG6Br7wFspJnZSbRxxiXOlAa
FxqwjB/Z6v8wKazS7hhAI/hSCbEi8VwPvccbTnIG8FG9vADMbt+FRp6uZSnPIgDh
@btcdrak
btcdrak / openpgp-card-guide.md
Created Sep 1, 2016 — forked from ageis/openpgp-card-guide.md
Quick GPG Smartcard Guide
View openpgp-card-guide.md

Quick GPG Smartcard Guide

We will generate a master key with only the Certify capability and three subkeys with each of the Sign, Encrypt and Authenticate capabilities. These latter three keys are meant for daily use and will be transferred to an OpenPGP smartcard, which has three corresponding slots. The master private key can then be moved to offline cold storage, or stored on a second smartcard.

We are generating keys on a secure computer instead of on the card, because it allows more flexibility. Ideally this means a machine running Tails or one that is air-gapped and not connected to the internet.

This guide assumes that if you want to sign other peoples keys, then you will require the aforementioned secondary smartcard with your master key stored in its Signature slot, or if you only have one smartcard, then you'll have to fetch the master key out of cold storage. By default, GPG generates a master key with the Certify and

@btcdrak
btcdrak / yubitouch.sh
Created Sep 1, 2016 — forked from a-dma/yubitouch.sh
Bash script for setting or clearing touch requirements for cryptographic operations in the OpenPGP application on a YubiKey 4.
View yubitouch.sh
#!/bin/bash
# Bash script for setting or clearing touch requirements for
# cryptographic operations the OpenPGP application on a YubiKey 4.
#
# Author: Alessio Di Mauro <alessio@yubico.com>
GCA=$(which gpg-connect-agent)
DO=0
UIF=0
@btcdrak
btcdrak / gpg-offline-master.md
Created Aug 31, 2016 — forked from abeluck/gpg-offline-master.md
GPG Offline Master Key w/ smartcard
View gpg-offline-master.md
View gist:7aeeccf8b487d6058ab87e1d3fcf6c62
test/txvalidationcache_tests.cpp(64): error in "tx_mempool_block_doublespend": check ToMemPool(spends[0]) failed
test/txvalidationcache_tests.cpp(70): error in "tx_mempool_block_doublespend": check ToMemPool(spends[1]) failed
test/txvalidationcache_tests.cpp(78): error in "tx_mempool_block_doublespend": check ToMemPool(spends[1]) failed
@btcdrak
btcdrak / sign.sh
Created May 3, 2016 — forked from ezimuel/sign.sh
Sign and verify a file using OpenSSL command line tool. It exports the digital signature in Base64 format.
View sign.sh
#!/bin/bash
# Sign a file with a private key using OpenSSL
# Encode the signature in Base64 format
#
# Usage: sign <file> <private_key>
#
# NOTE: to generate a public/private key use the following commands:
#
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem
View except.diff
diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py
index 19ee472..3b08cd1 100755
--- a/qa/rpc-tests/test_framework/test_framework.py
+++ b/qa/rpc-tests/test_framework/test_framework.py
@@ -142,6 +142,9 @@ class BitcoinTestFramework(object):
except AssertionError as e:
print("Assertion failed: "+ str(e))
traceback.print_tb(sys.exc_info()[2])
+ except KeyError as e:
+ print("key not found: "+ str(e))
@btcdrak
btcdrak / sendalert.cpp
Created Mar 20, 2016 — forked from laanwj/sendalert.cpp
Bitcoin send alert code
View sendalert.cpp
/*
So you need to broadcast an alert...
... here's what to do:
1. Copy sendalert.cpp into your bitcoind build directory
2. Decrypt the alert keys
copy the decrypted file as alertkeys.h into the src/ directory.
3. Modify the alert parameters in sendalert.cpp
View txverpolicy.diff
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index 332abc4..e3ed7be 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -55,7 +55,7 @@ bool IsStandard(const CScript& scriptPubKey, txnouttype& whichType)
bool IsStandardTx(const CTransaction& tx, std::string& reason)
{
- if (tx.nVersion > CTransaction::CURRENT_VERSION || tx.nVersion < 1) {
+ if (tx.nVersion > CTransaction::MAX_STANDARD_VERSION || tx.nVersion < 1) {
@btcdrak
btcdrak / exporter.js
Created Jan 17, 2016 — forked from simon-jentzsch/exporter.js
slack message exporter
View exporter.js
'use strict';
var _ = require("underscore");
var fs = require("fs");
var Slack = require('slack-api');
var token = "YOUR-TOKEN";
Slack.users.list({token:token}, function (error, data) {
// create a map with the real usernames
You can’t perform that action at this time.