Skip to content

Instantly share code, notes, and snippets.

View horner's full-sized avatar

Doug Horner horner

View GitHub Profile
@horner
horner / search-for-luks-header.py
Last active March 7, 2022 21:23 — forked from solsticedhiver/search-for-luks-header.py
Script to search offset of the LUKS header on a device file
#!/usr/bin/env python3
import threading
import queue
import argparse
import os.path
import sys
NUM_WORKER_THREADS = 16
LUKS_HEADER = b'LUKS\xba\xbe'
@horner
horner / appendonly.md
Last active October 28, 2021 03:55
Making log files append-able but not overwrite-able

Make a log file the usual way.

# echo `date` this is a log entry >> sample.log
# echo `date` this is a log entry >> sample.log
# echo `date` this is a log entry >> sample.log

See the output: