Skip to content

Instantly share code, notes, and snippets.

@christopherwoodall
christopherwoodall / FIREHOSE.md
Created December 11, 2024 05:30 — forked from davepeck/FIREHOSE.md
Zero-dependency Python script to decode the Bluesky firehose

Zero-dependency Python script to decode the Bluesky Firehose

This is a pure Python implementation of code necessary to decode the Bluesky Firehose's low-level binary data format.

It does not depend on any third-party libraries for decoding; we implement DAG_CBOR and CARv1 decoding ourselves.

To run this, install Astral's UV.

Then:

@christopherwoodall
christopherwoodall / landscape_to_blurred_portrait.sh
Created September 30, 2024 23:54 — forked from dupontgu/landscape_to_blurred_portrait.sh
Shell script to embed a landscape video inside a blurred, portrait version of itself.
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <input_video>"
exit 1
fi
input_file="$1"
if [ -z "$2" ]; then
@christopherwoodall
christopherwoodall / scapy_bridge.py
Created May 12, 2024 03:00 — forked from eXenon/scapy_bridge.py
Use scapy as a modifying proxy
#!/usr/bin/python2
"""
Use scapy to modify packets going through your machine.
Based on nfqueue to block packets in the kernel and pass them to scapy for validation
"""
import nfqueue
from scapy.all import *
import os
////////////////////////////////////////
// bitflip.arm.c
// Demo of shared memory
// Usage: This takes the first word of SHARED_RAM and flips every other bit
// over and over.
// If /dev/uio0 doesn't exist, consider using
// sudo ./bitflip.arm.out /dev/mem 0x4a300000
// Wiring: None
// Setup: Run this on the ARM and run bitflip.pru0.c or bitflip.pru1.c on the PRU
// See:
@christopherwoodall
christopherwoodall / docker_privesc.py
Created November 28, 2022 20:10 — forked from jon-stewart/docker_privesc.py
Root via non-privileged Docker container
#!/usr/bin/python3
import docker
from io import BytesIO
import os
import re
import tarfile
import time
@christopherwoodall
christopherwoodall / BackdoorContainer.py
Created November 28, 2022 20:09 — forked from pasknel/BackdoorContainer.py
Creating a Backdoor Container
import docker
client = docker.from_env()
payload = "INSERT PYTHON METERPRETER PAYLOAD HERE"
cmd = 'python -c "{0}"'.format(payload)
volumes = {
'/': {
'bind': '/host',
@christopherwoodall
christopherwoodall / custom.js
Created September 16, 2022 20:35 — forked from langheran/custom.js
~/.jupyter/custom/custom.js
// leave at least 2 line with only a star on it below, or doc generation fails
/**
*
*
* Placeholder for custom user javascript
* mainly to be overridden in profile/static/custom/custom.js
* This will always be an empty file in IPython
*
* User could add any javascript in the `profile/static/custom/custom.js` file.
* It will be executed by the ipython notebook at load time.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@christopherwoodall
christopherwoodall / Vitual keystroke example
Created June 30, 2022 00:06 — forked from chriskiehl/Vitual keystroke example
Python win32api simple Vitual keystroke example
#Giant dictonary to hold key name and VK value
VK_CODE = {'backspace':0x08,
'tab':0x09,
'clear':0x0C,
'enter':0x0D,
'shift':0x10,
'ctrl':0x11,
'alt':0x12,
'pause':0x13,
'caps_lock':0x14,
import os
import sys
import time
import logging
import dbus
from bluetooth import *