Skip to content

Instantly share code, notes, and snippets.

@oxnz
oxnz / dispatcher.py
Created September 21, 2013 16:17
python pcap dispatcher
#!/usr/bin/env python
#coding=utf-8
import struct
import sys
fp = open(sys.argv[1], 'rb')
data = fp.read()
pcap_header = {}
@oxnz
oxnz / blueutil.m
Created September 21, 2013 15:04
os x bluetooth util to change and refer bluetooth power state
/*
* blueutil
* Command-line utility to control Bluetooth.
* Uses private API from IOBluetooth framework (i.e. IOBluetoothPreference*()).
* http://www.frederikseiffert.de/blueutil
*
* This software is public domain. It is provided without any warranty whatsoever,
* and may be modified or used without attribution.
*
* Written by Frederik Seiffert <[email protected]>
@oxnz
oxnz / bsd_get_mac.c
Created September 18, 2013 06:42
get mac addr
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <sys/ioctl.h>
#include <net/if_dl.h>
#include <net/if_types.h>
@oxnz
oxnz / makefile
Created January 11, 2013 13:19 — forked from antmd/makefile
all:commonprefix
clean:
rm *.o urlchanger
CC=clang
CFLAGS+=-O0 -g
CXXFLAGS+=-O0 -g