Skip to content

Instantly share code, notes, and snippets.

View PhirePhly's full-sized avatar

Kenneth Finnegan PhirePhly

View GitHub Profile
@PhirePhly
PhirePhly / gist:9606989
Created March 17, 2014 19:57
breakapart.sh
#!/bin/bash
ls keys/ >keylist.txt
seq 10 99 |
while read KEYSUFFIX; do
mkdir -p chunks/keys.$KEYSUFFIX
grep -e "$KEYSUFFIX\.key" keylist.txt |
while read KEYFILE; do
mv keys/$KEYFILE chunks/keys.$KEYSUFFIX/
@PhirePhly
PhirePhly / ax25_headerlengthcheck.patch
Created May 23, 2014 07:53
Patch against aprx svn r593 fixing that empty path trackers are never "recently heard"
diff -u trunk/interface.c kwf/interface.c
--- trunk/interface.c 2014-05-23 00:42:35.275061632 -0700
+++ kwf/interface.c 2014-05-23 00:47:03.346194971 -0700
@@ -1013,7 +1013,7 @@
if (debug) printf("interface_receive_ax25() from %s axlen=%d tnc2len=%d\n",aif->callsign,axlen,tnc2len);
- if (axaddrlen <= 14) return; // SOURCE>DEST without any VIAs..
+ if (axaddrlen < 14) return; // Malformed packet without at least SOURCE>DEST.
// Note: Above one disables MICe destaddress-SSID embedded
kenneth@thor:~$ ntpq -pn -c rv
remote refid st t when poll reach delay offset jitter
==============================================================================
-205.233.73.201 72.214.41.45 3 u 58 64 377 88.240 7.810 0.506
-85.25.148.4 179.47.64.217 2 u 50 64 377 176.591 5.172 5.263
+72.87.88.202 64.250.229.100 2 u 59 64 377 96.172 2.468 1.348
+208.97.140.69 132.239.1.6 2 u 50 64 377 20.079 2.156 3.425
-91.189.89.199 140.203.204.77 2 u 57 64 377 163.520 5.535 0.202
*127.127.28.1 .GPS1. 0 l 15 64 377 0.000 0.007 0.010
239.192.6.87 .MCST. 16 u - 64 0 0.000 0.000 0.000
kenneth@odin:~$ ifconfig -a
em0 Link encap:Ethernet HWaddr 00:22:4d:ad:ad:be
inet addr:10.44.1.127 Bcast:10.44.1.255 Mask:255.255.255.0
inet6 addr: fe80::222:4dff:fead:adbe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:33044 errors:0 dropped:0 overruns:0 frame:0
TX packets:23402 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:38380796 (38.3 MB) TX bytes:1651076 (1.6 MB)
Interrupt:17 Memory:80020000-80040000
@PhirePhly
PhirePhly / ntp.conf
Created May 28, 2014 20:19
Needed config lines for strata 1 NTP servers
# NEMA time from GPSd
server 127.127.28.0
fudge 127.127.28.0 refid GPS
# 1PPS from GPSd
server 127.127.28.1 prefer
fudge 127.127.28.1 refid GPS1
#!/bin/sh
# WRT54G Mesh config script
# Kenneth Finnegan, 2014
HOSTNAME="WRTdefault"
SUBNET="10.44.254"
CHANNEL="11"
ESSID="KWF-mesh"
opkg update
@PhirePhly
PhirePhly / squid.conf
Created August 1, 2014 07:08
Sloppy protocol StoreID rules for Steam CDN
# This creates an access control list to match Steam's CDN
acl steamcdn dstdomain .cs.steampowered.com
# Specify what program to pipe URL through
store_id_program /usr/local/bin/steamrewrite
# How many of them to spawn at once. No documentation on this
store_id_children 10 startup=3 idle=1 concurrency=0
# Specify the ACL for URLs to be mangled
store_id_access allow steamcdn
store_id_access deny all
@PhirePhly
PhirePhly / syslog
Created August 19, 2014 02:19
Problems with one of my ATA channels
Aug 18 19:06:06 thor kernel: [102499.392524] ata4.00: exception Emask 0x10 SAct 0x800200 SErr 0x400000 action 0x6 frozen
Aug 18 19:06:06 thor kernel: [102499.392530] ata4.00: irq_stat 0x08000000, interface fatal error
Aug 18 19:06:06 thor kernel: [102499.392534] ata4: SError: { Handshk }
Aug 18 19:06:06 thor kernel: [102499.392537] ata4.00: failed command: READ FPDMA QUEUED
Aug 18 19:06:06 thor kernel: [102499.392542] ata4.00: cmd 60/f0:48:00:60:ac/00:00:a6:00:00/40 tag 9 ncq 122880 in
Aug 18 19:06:06 thor kernel: [102499.392542] res 40/00:bc:00:b4:ac/00:00:a6:00:00/40 Emask 0x10 (ATA bus error)
Aug 18 19:06:06 thor kernel: [102499.392545] ata4.00: status: { DRDY }
Aug 18 19:06:06 thor kernel: [102499.392548] ata4.00: failed command: WRITE FPDMA QUEUED
Aug 18 19:06:06 thor kernel: [102499.392552] ata4.00: cmd 61/00:b8:00:b4:ac/04:00:a6:00:00/40 tag 23 ncq 524288 out
Aug 18 19:06:06 thor kernel: [102499.392552] res 40/00:bc:00:b4:ac/00:00:a6:00:00/40 Emask 0x10 (ATA bus error)
wget -q http://musicforprogramming.net/rss.php -O - |
grep -o "http://.*\.mp3" |
sort -u |
while read URL; do wget -c $URL; done
@PhirePhly
PhirePhly / gist:a5514927ddba4a4ad1cc
Created October 10, 2014 00:31
Requested SSID scan at home
njord:~ kenneth$ sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport scan
Password:
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group)
5690 N Moccasin Trl 24:a2:e1:ec:54:e6 -85 11 Y US WPA2(PSK/AES/AES)
orchard-guest 2a:c6:8e:84:21:d9 -81 7 Y -- WPA2(PSK/AES/AES)
orchard 28:c6:8e:84:21:d8 -84 7 Y -- WPA2(PSK/AES/AES)
KWF-guest 2e:b0:5d:83:05:01 -30 11,-1 Y US NONE
KWF 2c:b0:5d:83:05:00 -31 11,-1 Y US WPA2(PSK/AES/AES)
Finnegan-Guest b8:e6:25:c6:a0:69 -64 6 N US WPA2(PSK/AES/AES)
ATT427 ac:5d:10:bc:da:aa -88 1 Y US WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP)