Skip to content

Instantly share code, notes, and snippets.

View jpouellet's full-sized avatar

Jean-Philippe Ouellet jpouellet

View GitHub Profile
@jpouellet
jpouellet / Info.plist.template
Last active August 29, 2015 14:19
Build OS X App with GNU Make
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>${BIN}</string>
<key>CFBundleIconFile</key>
<string>${ICNS}</string>
</dict>
</plist>
@jpouellet
jpouellet / vhash.sh
Created September 30, 2015 02:49
Verify hashes non-visually. Too many people only compare the first and/or last few hex digits, which is too easy to collide.
#!/bin/sh
z=$(basename "$0")
err() {
printf "%s: %s\n" "$z" "$1" >&2
exit 1
}
usage() {
@jpouellet
jpouellet / dhcpd.py
Last active August 8, 2022 14:31
Tiny PXE boot server for specific mac address w/ no side effects. (No DHCPNAKs to other hosts.)
#!/usr/bin/env python
import argparse
import struct
import logging
logging.getLogger('scapy').setLevel(logging.WARNING)
from scapy.all import *
def packMAC(s):
@jpouellet
jpouellet / zeroconf-guide.md
Last active March 3, 2021 09:58
Python ZeroConf guide for ECE-4564

Python ZeroConf guide, by Jean-Philippe Ouellet, for VT ECE-4564

Installing pybonjour

We want to install [pybonjour][pybonjour]. [pybonjour]: https://code.google.com/p/pybonjour/

Unfortunately it isn't easily installable with pip or the like, so we must build it ourselves.

Dependencies

@jpouellet
jpouellet / cve_2016_0728.c
Last active March 20, 2018 18:40 — forked from gcmurphy/cve_2016_0728.c
cve_2016_0728 exploit
/* $ gcc cve_2016_0728.c -o cve_2016_0728 -lkeyutils -Wall */
/* $ ./cve_2016_072 PP_KEY */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <keyutils.h>
#include <unistd.h>
#include <time.h>
@jpouellet
jpouellet / manuf.sh
Created July 5, 2016 03:41
Offline lookup of MAC address / vendor pairs using Wireshark OUI database.
#!/bin/sh
db_source='https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob_plain;f=manuf'
z=$(basename -- "$0")
if [ -z "$MANUFDB" ]; then
MANUFDB=~/.cache/manuf.db
fi
db=$MANUFDB
#!/usr/bin/env python
from pwn import *
r=remote('198.186.190.107', 4000)
r.sendafter('what name', sys.argv[1]+'\n')
r.sendafter('Password', sys.argv[2]+'\n')
log=open('mud.log', 'a')
@jpouellet
jpouellet / pocsag-twitter.sh
Created August 8, 2016 02:36
POCSAG decoder dumping to twitter
# Had gqrx running at 443.500 MHz, setup as in https://www.bastibl.net/pocsag/.
decode() {
nc -l -u -p 7355 \
| sox -t raw -esigned-integer -b 16 -r 48000 - -esigned-integer -b 16 -r 22050 -t raw - \
| multimon-ng -t raw -a POCSAG512 -a POCSAG1200 -a POCSAG2400 -p -f alpha - \
>> ~/dc/pocsag-decoded.log
}
tweet() {
@jpouellet
jpouellet / fakedns.sh
Created August 10, 2016 02:34
Generate noise in authoritative DNS logs. Uses names of random other servers on the net.
#!/bin/sh
VERBOSE=true
recursive_proxy=8.8.8.8
target="$1"
if [ -z "$target" ]; then
echo "Usage: $0 domain.tld." >&2
exit 1
@jpouellet
jpouellet / yi
Last active August 31, 2016 18:36
Next PARTAI!
#!/bin/sh
# yi: https://github.com/mutantmonkey/phenny/blob/master/modules/clock.py#L267
# ^ lives as Wadsworth in #vtluug/#vtcsec/others on OFTC
cycle=1753200
offset=$((432000 * 4))
fmt=$1
dfmt() { date -j -f %s $1 $fmt; }