Skip to content

Instantly share code, notes, and snippets.

View dev-zzo's full-sized avatar

DJ Sunshine dev-zzo

View GitHub Profile
Proxmark3:
proxmark3> hf 14a reader
UID : de ad ba be 11 22 33
ATQA : 03 44
SAK : 20 [1]
TYPE : NXP MIFARE DESFire 4k | DESFire EV1 2k/4k/8k | Plus 2k/4k SL3 | JCOP 31/41
MANUFACTURER : no tag-info available
ATS : 06 75 00 81 02 00 6e 79
- TL : length is 6 bytes
- T0 : TA1 is present, TB1 is present, TC1 is present, FSCI is 5 (FSC = 64)
# http://adamsblog.aperturelabs.com/2013/02/atmel-sam7xc-crypto-co-processor-key.html
# https://ridrix.wordpress.com/2009/09/19/mifare-desfire-communication-example/#comment-27
from binascii import hexlify, unhexlify
from Crypto.Cipher import DES3
def xor(a, b):
x = ''
for i in xrange(8):
x += chr(ord(a[i]) ^ ord(b[i]))

Frequencies of interest

Weather Fax

Nominal freq USB Freq Station name
2618.50 2616.60 GYA Northwood
3585.00 3583.10 HLL Seoul
3622.50 3620.60 JMH Tokyo
3855.00 3853.10 DDH3 Hamburg
def hexdump(data):
"""Pretty print a hex dump of data, similar to xxd"""
lines = []
offset = 0
while offset < len(data):
piece = data[offset:offset + 16]
bytes = ''.join([('%02x ' % ord(x)) for x in piece])
chars = ''.join([(x if 0x20 < ord(x) < 0x7f else '.') for x in piece])
lines.append('%04x %-24s %-24s %-16s' % (offset, bytes[:24], bytes[24:], chars))
offset += len(piece)
@dev-zzo
dev-zzo / airband.md
Last active October 11, 2019 19:49
Airband receiver

Airband receivers

Heya all! I was asked to write up a document on how to build your own autonomous airband ACARS receiver and join the club. Before you start shelling out moneys, though, I recommend checking whether there is any plane activity in your area: go visit your favourite plane spotting site (e.g. flightradar24) and observe air traffic for awhile; if there's nothing flying above for the whole day, there is no big point in setting up.

My big thanks extends to Thierry and Hugo who helped to beta test this document. :-)

Without any further delay, let's dive.

To build a working receiver, you will need:

@dev-zzo
dev-zzo / stm32.idc
Last active October 13, 2017 08:01
IDC scripts for STM32
//
// This script generates MMIO segments for STMicro Cortex-M3 cores
//
#include <idc.idc>
static DefineSegment(sa, sz, name) {
SegCreate(sa, sa + sz, 0x1, 1, 1, 2);
SegRename(sa, name);
SegClass (sa, "MMIO");
<html>
<body>
<script>
document.cookie = "FANCYPANTS";
console.log("parent origin: " + self.location.origin);
console.log("cookie: " + document.cookie);
var html = '<bo'+'dy><scr'+'ipt>console.log("iframe origin: " + self.location.origin);console.log("cookie: " + document.cookie);</scr'+'ipt></bo'+'dy>';
var iframe = document.createElement('iframe');
iframe.src = 'data:text/html;charset=utf-8,' + encodeURI(html);
document.body.appendChild(iframe);
diff -Naur backports-4.4.2-1/defconfigs/ath9k-debug backports-4.4.2-1-modwifi/defconfigs/ath9k-debug
--- backports-4.4.2-1/defconfigs/ath9k-debug 2016-02-18 22:41:34.000000000 +0100
+++ backports-4.4.2-1-modwifi/defconfigs/ath9k-debug 2016-04-03 13:28:53.000000000 +0200
@@ -17,3 +17,4 @@
CPTCFG_ATH9K_HTC=m
CPTCFG_ATH_DEBUG=y
CPTCFG_ATH9K_DEBUGFS=y
+CPTCFG_ATH9K_HTC_DEBUGFS=y
diff -Naur backports-4.4.2-1/drivers/net/wireless/ath/ath9k/htc_drv_debug.c backports-4.4.2-1-modwifi/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
--- backports-4.4.2-1/drivers/net/wireless/ath/ath9k/htc_drv_debug.c 2016-02-18 22:41:35.000000000 +0100
[Unit]
Description=ACARSdec service
After=multi-user.target
StartLimitIntervalSec=0
[Service]
Type=idle
Restart=always
RestartSec=1
ExecStart=/opt/acarsdec/acarsdec -g 320 -N 192.168.1.46 -i DJ-FRB -r 0 131.525 131.725 131.825
@dev-zzo
dev-zzo / Makefile
Last active December 14, 2018 17:33
Arduino EPROM programmer
CC=avr-gcc
OBJCOPY=avr-objcopy
OBJS=main.o
PROJECT=eprog
CFLAGS=-Os -mmcu=atmega328p
LDFLAGS=-Os -mmcu=atmega328p
.PHONY: all burn clean
all: $(PROJECT).flash.hex