This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
void main(int argc, char *argv[]) | |
{ | |
if( argv[1][0] == 'f' ) { | |
if( argv[1][1] == 'o' ) { | |
if( argv[1][2] == 'o' ) { | |
if( argv[1][3] == '\x00' ) { | |
printf( "good password\n" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, binascii, struct | |
def main(argv=None): | |
for offset in [0x200, 0x10100, 0x20100, 0x30100, 0x40100, 0x50100, 0x60100, 0x70100, 0x80100, 0x90100]: | |
f=open(sys.argv[1], 'rb') | |
extract_httpd_resource_files(offset,f) | |
for offset in [0x95a15, 0xdd485]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# dump the contents of an atmel AT45DB041B flash part to 'data.bin' | |
# usage: ./dump_AT45DB041B.py /dev/ttyUSB0 | |
# tested w/ https://github.com/audiohacked/pyBusPirate ac19e00b53, Bus Pirate Hardware labelled v3.6, Firmware: "Bus Pirate v3b, Firmware v5.10 (r559), Bootloader v4.4" | |
# bugs: slow. as in... dozens of hours :/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import json, sys | |
# convert time warner cable's json channel listing to csv | |
# http://www.timewarnercable.com/northeast/support/clu/clu.ashx?CLUID=476&Zip=14534&Embedded=true | |
# 1. use chrome's "network" tab in "developer tools" to obtain a curl command line to retrieve the listing (http://www.timewarnercable.com/CustomerService/Clu/CluJson.ashx?[..]) | |
# 2. retrieve the listing w/ curl | |
# 3. nuke the non-ascii bytes perl -i.bak -pe 's/[^[:ascii:]]//g' time_warner_channel_listings.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import thread, sys, time | |
if sys.argv[1] == "other": | |
fifo_w = open('/tmp/south', 'wb') | |
fifo_r = open('/tmp/north', 'rb') | |
log = open('/tmp/serial_log_southbound', 'wb') | |
else: | |
fifo_r = open('/tmp/south', 'rb') | |
fifo_w = open('/tmp/north', 'wb') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# create a pty and attach it to python app's stdin/out | |
socat -ddd -ddd PTY,raw,echo=0 "EXEC:'python /home/tz/proj/dsc/stdinout_tofrom_named_pipe.py that',pty,raw,echo=0" | |
# create a second pty and attach it to python app's stdin/out | |
socat -ddd -ddd PTY,raw,echo=0 "EXEC:'python /home/tz/proj/dsc/stdinout_tofrom_named_pipe.py other',pty,raw,echo=0" | |
# write some binary data into the first pty (where '7' is what's printed by socat) | |
cat /bin/true > /dev/pts/7 | |
# read some binary data from the second pty (where '11' is what's printed by socat) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
socat -ddd -ddd PTY,raw,echo=0 "EXEC:'python /home/tz/proj/dsc/stdinout_tofrom_named_pipe.py that',pty,raw,echo=0" & | |
SOCAT_PID1=${!} | |
echo | |
read -p 'Enter PTY number (eg "12"): ' PTY1 | |
sudo slattach -dv -p slip /dev/pts/${PTY1} & | |
SLATTACH_PID1=${!} | |
echo | |
read -p 'Enter interface name (eg "sl0"): ' IFACE1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* modem.pde | |
* | |
* Copyright (c) 2014 panStamp <contact@panstamp.com> | |
* | |
* This file is part of the panStamp project. | |
* | |
* panStamp is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r d8638b19d99d bluelog.c | |
--- a/bluelog.c Tue Jun 30 21:44:06 2015 -0400 | |
+++ b/bluelog.c Tue Jun 30 21:48:00 2015 -0400 | |
@@ -911,7 +911,7 @@ | |
{ | |
if (friendlyclass) | |
{ | |
- printf("[%s] %s,%s,%s,(%s)\n",\ | |
+ printf("%s,%s,%s,%s,(%s)\n",\ | |
dev_cache[ri].time, dev_cache[ri].addr,\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import subprocess, time, os, sys | |
#TODO: kill any already-running bluelog instances | |
cmd = ['./bluelog', '-m', '-t', '-f', '-a0', '-n', '-v'] | |
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) | |
mru_macs = [] |
OlderNewer