Logs


Jun. 1, 2018

Script to bulk resize images

Intro A quick script I wrote to create resized copies of all the images in a folder to a given percentage of the original size, copied to a new subfolder in turn with the new geometry in the image filename (which I find helpful). For instance, if you had a folder named Poland containing a gazillion images you wished to have at 20% their current size, you would: ./bulk-image-resize.sh Poland 20 This would result in a new sub directory resized containing the directory 20 with copies of the images at 20% their former size.

Apr. 3, 2017

USB intrusion watchdog

A simple watchdog script alerting you via email when a USB device is plugged into your system. It was inspired by USB Canary. I didn’t like the Python and Slack dependencies so just quickly wrote this up as a shell script, depending only on msmtp. # Simple USB intrusion watchdog for GNU/Linux systems # # Requires msmtp, configured to send email via a mailserver. # # Sends email to configured address via an SMTP server when a USB device is # plugged into a laptop.

Mar. 14, 2016

Script to generate multiple OVPN files

Intro I’ve needed to generate many hundreds of unique OpenVPN files at a time (end with ovpn) for a growing list of Cyborg Unplug owners. Here’s a quick and dirty script that does the job: #!/bin/bash OUTDIR= # /path to the directory to save out to REMOTE= # IP of the VPN server goes here NAME= # Common Name, required. Appended with an iterating number #NAME= unplug_ PORT=1194 # Change as needed source .

Dec. 18, 2015

Detect and disconnect WiFi cameras in that AirBnB you're staying in

Context There have been a few too many stories lately of AirBnB hosts caught spying on their guests with WiFi cameras, using DropCam cameras in particular. Here’s a quick script that will detect two popular brands of WiFi cameras during your stay and disconnect them in turn. It’s based on glasshole.sh. It should do away with the need to rummage around in other people’s stuff, racked with paranoia, looking for the things.

Sep. 12, 2015

Sweeperate

If you’re an SDR geek using OsmoCOM’s excellent SDR suite, you may find this useful. I’ll let the code header below do the explaining: #!/bin/bash # ——————————————————————————–> # ‘osmo-sweeperate’ # Write out one file per sweep from output of ‘osmocom_spectrum_sense’ # from the OsmoCOM SDR rtl-sdr project: # http://sdr.osmocom.org/trac/wiki/rtl-sdr # # Each sweep can then be meaningfully represented in a typical 2D graph, # plotted with GNU Plot or loaded into other software for analysis.

Aug. 8, 2015

Random MAC addresses with Bash

Intro I needed a shell-only way of generating (pseudo) random MAC addresses for an embedded Linux project, without relying on external CLI programs like macchanger, etc. So, I wrote the below simple shell script. It runs in the bash and requires bc, which are both standard on most Linux distributions and probably OS X, too. Code #!/bin/bash # Generate (pseudo) random MAC addresses RANGE=255 # Set some vendors, for prepending. Makes a MAC 'valid' # Pick another vendor from here: # https://code.

Jun. 16, 2015

The Orchid Project

Intro Here I use Flickr as a storage medium for free, open-source firmware (operating system) images that can be used to liberate 10 popular routers. The firmware images are from the OpenWrt project and are encoded into Creative Commons licensed photos of orchids found on Flickr.

May. 1, 2015

Starbucks Sentier, Paris 01-05-15

Brief This capture was taken from inside Starbucks at 21 Rue des Petits Carreaux, Paris, starting at around pm. I had a 100Mb target, which I reached in 20 minutes. There were 11 active devices pulling data packets at the site. Method used I could see a lot of traffic on channel 6, which was the Starbucks BSSID. I started the capture on channel 6, like so: airodump-ng mon0 -c 6 -d -w starbucks-sentier I used this script of mine to extract images from the capture, leveraging foremost and ImageMagick.

May. 1, 2015

The Snowden Templates

Introduction This page will host LibreOffice presentation templates based on existing Snowden NSA and GCHQ releases. Use them to fuzz journalists, testing their vigilance and integrity or just to feed your relentless, fist-eating paranoia that the NSA and GCHQ leaks might actually be a part of a vast and evil Alternate Reality Game designed by Glenn Greenwald. Afterall, what do we know? NSA Template 1

Dec. 12, 2014

Noise of the World

Introduction To my surprise, I found the news to be even bleaker today than in previous days and so out of self-preservation chose not to read further. Instead I took the opportunity to render it out as noise, hearing it instead. The basic technique is very simple, capture traffic on a network interface with the popular packet capture tool tcpdump and throw it straight to the sound card, which on Linux systems is represented by a file.

Oct. 23, 2014

CSV from 'iw' output

Intro A long and lingering issue with wireless 802.11 work in a UNIX context is filtering AP scans into a meaningful form such that the important bits (BSSID, ESSID, channel) can be used by shell scripts, PHP, etc. This is something grappled by many with ‘iwlist’, but as it is now legacy (along with ‘iwconfig’) across Linux distributions, a migration of scripts to ‘iw’ is required to ensure portability. Here is a short script that will take the output of a scan and place it into a formatted CSV with fields on a single line, like so:

Sep. 23, 2014

Battery alarm for GNU/Linux systems

I needed a little audible alarm to alert me when a laptop on the other side of the room or little device without display is running out of battery. Written on the run it’s nothing complex - all I need to know is when I’m under an hour so I can plug in. You’re welcome. Code #!/bin/bash # Cute little audible alarm for low battery on GNU/Linux systems. # Requires 'beep' and 'acpi'.

Jun. 12, 2014

Glasshole.sh in context

My interview for Swedish Press.

May. 30, 2014

Find a Google Glass and kick it from the network

“Privacy is the power to selectively reveal oneself to the world.” - A Cypherpunk’s Manifesto, 1993

May. 7, 2014

My interview for Israel's Haaretz, in English

Context I was invited to Tel Aviv to give a workshop and public lecture, as part of the Print Screen festival. While there I was interviewed by Ido Kenan, a prominent technology and culture journalist, for Haaretz, Israel’s oldest daily newspaper. The interview was conducted in English but translated and published in Hebrew. It was presented in a broader article on Critical Engineering and work within that frame. The original Haaretz article is here (Hebrew, paywalled) and here (Hebrew, open).

Apr. 23, 2014

Method for extraction and presentation of image content from captured wireless traffic

Intro Here I present a simple method, using command-line utilities wrapped up in shell scripts, for extracting JPG/GIF/PNG images from captured wireless traffic and presenting them in a browser. This is something similar to that done live by standalone software like driftnet, which I modified for use in my Foehnseher project, but being a C program and a bit awkward to work with I wanted to document a clean and adaptable solution built around a shell script.

Mar. 12, 2014

On my rejection of a Prix Ars nomination

I was nominated for an award in the Interactive Art category of PRIX ARS ELECTRONICA. This is the letter from Ars Electronica (with jury member name removed): ..on Thu, Mar 06, 2014 at :00PM +0000, Prixars Interactive wrote: Your work The Transparency Grenade has been nominated by our Jury member XXXX for the Prix Ars Electronica 2014 / Interactive Art category - CONGRATULATIONS! This year’s PRIX ARS ELECTRONICA is celebrating it’s 28th anniversary within 5 categories, 5 Golden Nicas and awards totalling more than EUR 60.

Feb. 13, 2014

Documentation of GSM spoofing strategy used at Transmediale, 2014

Introduction This post documents aspects of the GSM spoofing component of PRISM: The Beacon Frame, as presented at Transmediale 2014. On the opening night of Transmediale the project successfully hijacked the cellular connection of at least 740 phones, without any interaction from users. Many more were intercepted the following day. While the intervention was met with much appreciation, humour and celebration, this element of the project was soon sabotaged by the head of the contract AV company working for the festival in response to a few complaints from audience.

Dec. 7, 2013

Dec. 7, 2013

Resume to screen-lock for minimal window managers on Linux/BSD

If, like me, you don’t use a desktop environment but rather an ultra minimal window manager like DWM or Evil WM you may miss the same suspend-and-resume-to-screenlock seen in desktop environments (Ubuntu, OS X, Windows). This is how I’ve been doing it for 5 or so years: I use xtrlock as my X11 screen-locker. It has a small install footprint, just 88K, and can be neatly integrated into your bash, zsh etc shell environment as an alias.

Jul. 31, 2013

Kill Packet

Android and Server Side code, proposal and reference implementation This project was started to address a hypothetical case one has volatile data on a remote machine that needs to be removed as fast and as discretely as possible. In such situations opening up a laptop and logging in via SSH, an SFTP/FTP browser etc may simply be too slow. Rather, it would be more convenient to just long-press a single button on your phone that sends a network packet to the server, triggering a script that proceeds to delete your data and/or back it up to another trusted server.

Feb. 24, 2013

Kill Packet

This post explores a hypothetical case where one has volatile data on a remote machine that needs to be removed as fast and as discretely as possible without having to open up a laptop and log in via SSH, an SFTP/FTP browser etc. Rather, this post assumes it would be more convenient to just hit a single button on your phone or click a single icon that sends a network packet to the server, triggering a script that proceeds to delete your data and/or back it up to another trusted server.

Feb. 12, 2013

Antisocial Wireless Networking

The below script will find other devices on the wireless LAN with you and deauthenticate them, in the spirit of antisocial networking. It requires a GNU/Linux host, aireplay-ng and arp-scan, all of which are in the repositories for most Linux distributions. Feel free to use it on networks with horrible people and/or devices. #!/bin/bash # ANTISOCIAL WIRELESS NETWORK SCRIPT # requires arp-scan, aireplay-ng and a GNU/Linux host # exec as follows: # # .

Jan. 27, 2013

Network shouting

In public space we can speak to ourselves, another person or to everybody. This latter kind of speaking is known as shouting. On a computer network the equivalent comes in the form of ‘broadcast’ packets, sent to every single host (computer, smartphone, router) on the same network subnet you are on. Such packets are used to manage aspects of the network’s functionality or announce services such as network printer sharing. Here is a command that will shout angrily at every device on the network you’re on, should you ever feel the need.

Jan. 18, 2013

Google WebFonts without dialing Google

If you don’t want to be sending a notice to Google every time your site is visited - due to the fact that all webfonts are downloaded each time from Google - you can do this. Go to the Google WebFonts page for your font. Add it to your “Collection”. Download your collection locally to a folder with the name of your font and unzip it. Go to the URL in your CSS for the webfont (in my case Metrophobiac).

Jan. 17, 2013

Song of the Theodolites

A project proposal for Screen City, City of Stavanger, 2013 Wherever it sets foot, the theodolite heralds change. For centuries this device has been used by the surveyor to measure both urban and rural environments, resulting in Euclidean models used by the planners and developers that shape the world we live in. Song of the Theodolites diverts the forboding gaze of the theodolite to the service of music rather than the ongoing project of transforming and expanding our cities.