Skip to content

Instantly share code, notes, and snippets.

View donovanhide's full-sized avatar

Donovan Hide donovanhide

View GitHub Profile
gngoGG1xMYUVspgxbRqu15J775qdgWhhz7,97979996999.99995/STL
g4eRqgZfzfj3132y17iaf2fp6HQj1gofjt,76311228.492685/STL
gDSSa75HPagWcvQmwH7D51dT5DPmvsKL4q,805893.920879/STL
gN4oHfh4iLRCSsrHVxVHzt6rZXs6EyTCe4,549994.999987/STL
gHAzb6CrqsiVPrHUfTata3GpoEntYGVhj6,243018.999987/STL
gJ9vC8DNdy2qePAWRXP8ETH8e9nfTuG1LH,93701.999987/STL
gLPcKR5YNPoErtnoqyseFh1zGiTcgStX8u,74000.999975/STL
gERtBG8RNy7jbiW7xfaJyRsKjjhtYjvHvz,41000.999975/STL
g39ir92Fa2MgNKaACTYuaZPGcoQoW6dsBW,41000.999975/STL
g3AERsAJ7ZqyEGaMnu2NJwjuXzN8e4CF6n,40000.999999/STL
@donovanhide
donovanhide / gist:cab46d6b8b790ba5c0b0
Last active August 29, 2015 14:04
Simple, untested config monitoring
package main
import (
"code.google.com/p/go.exp/fsnotify"
"flag"
"log"
"math/rand"
"os"
"os/signal"
"time"
@donovanhide
donovanhide / gist:7c2e36c9257940063300
Created June 16, 2014 11:55
Transactions with rounding scenarios (Ledger,Transaction Hash,Scenario)
269818 4FBADBCBCBC859356FD416C43B2A4E2191A70CC9D01B673F12F7DAFADD5E3769 Deleted Offer PreviousFields missing TakerPays
280743 0E6D8CDDB97000986B9B89E583216E301D6A4ABA6EC091BD9EF6FD90128184B8 Deleted Offer PreviousFields missing TakerPays
306620 67AA60A3C48B10F9D64C9E97241D2350D8D2BF4FF7B7C6675056C46088F63FEF Deleted Offer PreviousFields missing TakerPays
310066 22A5697184B46E992F8F893851A8E0334FFB01300D38453B80620037096BE5E5 Modified Offer PreviousFields missing TakerPays
335503 BF71BF41DDAC63F59571BC97857AFF7CE92AE9434F81584AD1B22F95F81F1DF0 Deleted Offer PreviousFields missing TakerPays
341936 11B94C6C664E146ABAA47DA0DE5E419D63366B34CA5CD10E187DDA566E4BFABF Deleted Offer PreviousFields missing TakerPays
346247 E49F93FB0C683955B50C99765B70741A5D01D59E029B067BD35E7D5F71E0D4A9 Modified Offer PreviousFields missing TakerPays
370235 78DD2FF70BFE161312730BDFD781CF7C0EBD80A14FB66175B1F0842DF2D30895 Modified Offer PreviousFields missing TakerPays
374778 CE88CC97F0A1CE4C4788AC84CFD00F5135D8D18994A2A9445AA499717E2AE8
@donovanhide
donovanhide / gist:3b65b9b465610789fcc1
Created May 21, 2014 20:19
No sign of missing transactions in first Ripple Labs supplied complete ledger dump
lz4cat dump.lz4|LC_ALL=C gfgrep -f wanted > found
@donovanhide
donovanhide / gist:5779ee044220f03e6c1e
Created May 20, 2014 21:37
Transaction ids and raw transactions with transaction id prefix using transactions stored in transactions.db
7B6226018FD59FBF988E045BBF4A4D457883F3B81BEA941B54AB2F8983BEA505:54584E0012000022000100002400000001614000082F79CD900068400000003B9ACA0073210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD020744630440220196959B245C76126056B7654A44E541B9218BBE5447B22D8F70D6D1F061600C502203C9C490085685D94EE35B5705C333F83017CA62C65FA4E220EE557215079F97D8114B5F762798A53D543A014CAF8B297CFF8F2F937E88314C06883DA16983A0289DFAC996C491D8F8E8FD996
B6EC3A86F5850AAE97CCBBA44CA5A59E918BBD77E973918C150EBA949BA0E140:54584E001200002200010000240000000261401C6CDDFAD9100068400000000000000A73210330E7FC9D56BB25D6893BA3F317AE5BCF33B3291BD63DB32654A313222F7FD02074463044022032751BF8FF743E668C321FBB8688C788608B93CACF09A7798B7EC50FA76CDADA0220623EE19763363D0FAFC948414DDA4516CD56627A39C76AA7DD4822C119363D928114B5F762798A53D543A014CAF8B297CFF8F2F937E88314C06883DA16983A0289DFAC996C491D8F8E8FD996
3792284EACC486632AD0426A8162516718E3F5753B9B79C7D57A916676F683B6:54584E00120000220001000024000000036140000000001E848068400000003B9ACA0073210330E7FC9
@donovanhide
donovanhide / gist:0e41e548bd43127bbfc5
Created May 20, 2014 20:04
Evidence of no missing transactions in provided dump
ATTACH DATABASE 'ec1/hashnode.db' AS ec1;
ATTACH DATABASE 'ec2/hashnode.db' AS ec2;
ATTACH DATABASE 'ec3/hashnode.db' AS ec3;
ATTACH DATABASE 'db_old.1/hashnode.db' AS db1;
ATTACH DATABASE 'db_old.2/hashnode.db' AS db2;
ATTACH DATABASE 'db.3/hashnode.db' AS db3;
SELECT HEX(OBJECT)
FROM(
SELECT 'ec1' AS Source,* FROM ec1.CommittedObjects
@donovanhide
donovanhide / gist:11272001
Created April 24, 2014 22:41
Reports on bytes used in the Ripple nodestore
--Total bytes used for nodes with LedgerSequence>=32570
SELECT MIN(Ledger),MAX(Ledger),FORMAT(SUM(Length),0) FROM headers WHERE Ledger>=32570;
+-------------+-------------+-----------------------+
| MIN(Ledger) | MAX(Ledger) | FORMAT(SUM(Length),0) |
+-------------+-------------+-----------------------+
| 32570 | 6234456 | 435,232,146,456 |
+-------------+-------------+-----------------------+
1 row in set (3 min 49.36 sec)
@donovanhide
donovanhide / gist:6541191
Last active December 22, 2015 22:39
https://canyoufindit.co.uk solution for fourth part. Find the two jpeg headers. Skip the first to reveal the second!
$curl -s http://www.theregister.co.uk/Design/page/hub/gchq-enigma2013/img/image/comp3.jpg | xxd -g0 | grep ffd8ff
0000000: ffd8ffe000104a4649460001010100c8 ......JFIF......
000cbd0: 401fffd9ffd8ffe000104a4649460001 @.........JFIF..
$ curl -s -r 52180- http://www.theregister.co.uk/Design/page/hub/gchq-enigma2013/img/image/comp3.jpg > 4.jpg
@donovanhide
donovanhide / fixkey.py
Created September 12, 2013 16:24
Solution to problem 3 in https://canyoufindit.co.uk/ The key file is corrupt. Rebuild it using pycrypto.
from Crypto.PublicKey import RSA
import binascii
badKey="""-----BEGIN RSA PRIVATE KEY-----
MIIC2gIBAAKBgDfABK8+joDLdbFTDJ+y3PTTzkqCi1L2qEjgxdg1iyZshJTeKUck
SYVyKBeOBtB3FwwqXVa6iNEHJeLFewFE6ulEOIcatVp11Zg0ibMfnqTivbd6t8/z
3KzqrFksg9xQiicMactmTqFkm8ro5ODc2NTQzMjEwLy4tLCslBOCOVHxAgMBAAEC
gYATW12FB2BtQbecmSxh6rWjYENZRZhgdvoZS8oF9xlYfwdNtRF5/RR1/BwFia++
BAuBktgTu/KzORsjcNPzrd0uTCbTG6hW8YPK2ROVOOeAMHek8Nl3+SW5wdePKuWw
MdjDDjqxXDns+ZC1d2Cpz5V+x+2znOYL0bsEKei0sWl7LQKBgDfABK8+joDLdbFT
// func GetCpuForThread() uint64
TEXT ·GetCpuForThread(SB),7,$0
MOVQ $0xB,AX
XORQ CX,CX
CPUID
MOVQ DX,ret+0(FP)
RET