Skip to content

Instantly share code, notes, and snippets.

@huettenhain
huettenhain / nytimes-digits-solver.rs
Created June 4, 2023 21:30
Solve the NYTimes Digits Puzzle by Brute Force
#[derive(Copy,Clone,Debug)]
enum Operator {ADD, SUB, MUL, DIV}
#[derive(Copy,Clone,Debug)]
struct Operation {
lhs: usize,
rhs: usize,
operator: Operator,
}
@huettenhain
huettenhain / idasplit.py
Last active June 26, 2022 19:55
A simple plugin to open the IDA Hex-Rays decompiler output to the right of all remaining tabs in a split view automatically.
import idaapi
import ida_hexrays
def runonce(function):
function._first_run = True
def wrapper(*args, **kwargs):
if function._first_run:
function._first_run = False
return function(*args, **kwargs)
return wrapper
@huettenhain
huettenhain / keybase.md
Created May 18, 2019 16:56
Keybase verification

Keybase proof

I hereby claim:

  • I am huettenhain on github.
  • I am jesko (https://keybase.io/jesko) on keybase.
  • I have a public key ASDAgH1zdcBxupLlc1BL2FZjXmLdK1Ptfxh58g0zzW55HQo

To claim this, I am signing this object:

@huettenhain
huettenhain / check_weak_aes_gcm_key.py
Created December 28, 2015 15:44
Check for weak AES keys in GCM
# Test for weak AES keys when used in Galois Counter Mode with a block size
# of 128 bits, as explained in the paper "Cycling Attacks on GCM, GHASH and
# Other Polynomial MACs and Hashes": https://eprint.iacr.org/2011/202.pdf
# This snippet requires the Crypto module:
# pip install Crypto
from Crypto.Cipher import AES
from Crypto.Util.number import bytes_to_long, long_to_bytes
from Crypto.Random import random