Skip to content

Instantly share code, notes, and snippets.

View kevinwallace's full-sized avatar
🍞

Kevin Wallace kevinwallace

🍞
View GitHub Profile
#!/usr/bin/python
import sys
import string
text = sys.stdin.read().strip()
alpha = "abcdefghijklmnopqrstuvwxyz"
for i in range(26):
shifted = alpha[i:] + alpha[:i]
frm = alpha + alpha.upper()
From ecbfba5bfd8f84511793901a2f82210c8db08213 Mon Sep 17 00:00:00 2001
From: Kevin Wallace <kevin@pentabarf.net>
Date: Tue, 3 Dec 2013 01:45:13 -0800
Subject: [PATCH] macvlan: Support creating macvtaps from macvlans
When running in a network namespace whose only link to the outside
world is a macvlan device, not being able to create a macvtap off of
it is a real pain.
So modify macvtap creation to automatically forward a creation of a
@kevinwallace
kevinwallace / SpoofMAC
Created January 17, 2013 07:14
Startup script to set a random MAC address at boot. Usage: sudo mkdir /Library/StartupItems/SpoofMAC sudo cp SpoofMAC StartupParameters.plist /Library/StartupItems/SpoofMAC cd /Library/StartupItems/SpoofMAC sudo chown root:wheel SpoofMAC StartupParameters.plist sudo chmod 0755 SpoofMAC sudo chmod 0644 StartupParameters.plist Modified from https:…
#!/bin/sh
. /etc/rc.common
StartService ()
{
ConsoleMessage "Running SpoofMAC script."
/usr/sbin/networksetup -setairportpower en0 on
/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport -z
/sbin/ifconfig en0 ether `python -c 'import random;print ":".join("%02x" % octet for octet in [random.randint(0,64) << 2] + [random.randint(0,127) for _ in range(5)])'`
/usr/sbin/networksetup -detectnewhardware