I hate it here

It is raining so hard I can hear it over my music and the rumble of the bus. It is raining in the book I am reading. Completely unconnected events, but humans have this thing for making patterns where they don't exist.

In this book over centralisation leads to a complete media blackout. Decentralisation is a core ethical tenant , of course I enjoy the collapse of the media in the story.

But what can you do about centralisation?

Until the singularity you are going to be stuck as a centralised human being. I know it sucks, but one day we will be able to move past this.

The indieweb movement has great advice for getting started . The biggest single step you can take to decentralise yourself on the internet is to have another machine to represent you.

Once you have a VPS running somewhere in the internet, you have access to an constantly running, near permanent version of yourself.


Reading: Little Brother, Transmetropolitan

Red Team Newsletter

I was pretty much dead yesterday, I didn't do anything interesting.

I signed up for an Offensive Security Newsletter from Phobos Group . I don't normally take corporate output directly, the people behind Phobos have a track record of doing awesome things. The first issue appeared today, certainly worth a read.

I have been thinking about adding more automation into my...I dunno life? This morning I was thinking about using post tags to automatically cross blog to reddit. I think that might work for well for hacking , radio definitely has a home in the ham subreddits.

I am not sure if there is somewhere that will welcome the daily morning posts. /r/Blogging has a weekly 'Check out my blog' thread, but it is limited to one post per blog per week. I wonder if there is somewhere I can feed my daily ritual, like a don't break the chain place .

I will automate everything to go out the twitter hole , I would like to do the tag thing to irc channels to. That might be a bit insane and self promotional though.


Reading: Little Brother, Transmet

Triangles are my favourite shape

Damn, today has been a hard fucking start up sequence ( slow starts punk brother ). TCP jokes are the best, if you don't get them we can keep retrying until you do.

This tweet by dwf

Possibly the most unbelievable thing about Star Trek is how different alien
civilizations maintain cross-compatible video calling software.

It's a funny joke. Current humans are still competing in the name of capitalism, there is little to no incentive to build interoperable system when you can control a market sector. Of course no one actually can, but that doesn't stop facetime not being available on android.

Rants aside; We are going to solve this set of problems with automation, machine learning and AI. Here is a great talk on transport layer improvements , it talks about machine learning approaches to optimise delay/bandwidth for live streaming video connections.

It is entirely feasible that we could run similar approaches to coordinate video communication, especially if we are a civilisation that spends all of its time exploring and finding new people to speak to. Automate the boring stuff, you know?


Reading: Little Brother, Transmet

The BBC have an excellent rendition of Burning Chrome by William Gibson. I am sure a neighbour will help you out if you are geographically impaired.

Parsing data from pcaps

On Sunday I set up some quick and dirty temperature monitoring. At that point I didn't have any server code lying around to recieve the readings from the sensors. I set up tcpdump on a fileserver to capture the packets, tcpdump has the benefit of loggin a timestamp with each packet helping me get around limitations of the nodemcu hardware.

A day later I have to try and process the pcap files.

$ tcpdump -A -r temperaturevalues.pcap-1 | head -n 4
reading from file temperaturevalues.pcap-1, link-type EN10MB (Ethernet)
12:20:55.766057 IP 10.4.4.160.4097 > 10.4.4.187.acmsoda: UDP, length 134
E...........
...
......9....[{"humditiy": 47, "temp": 23, "pin": "Pin(4)", "sensor": "Pin(4)"}, {"humditiy": 45, "temp": 21, "pin": "Pin(5)", "sensor": "Pin(5)"}]

The -A flag for tcpdump will show me the packet payload as ascii, I was pushing json from the server so this is rather easy to see. I could use some shell magic to pull this out, but I wanted to play with scapy.

Scapy is a python library for dealing with packets, it does everything tcpdump will with packet injection to boot. Scapy will happily take in the pcap files.

#!/usr/bin/env python

from scapy.all import rdpcap
import json

if __name__ == "__main__":
    pcapfiles = [ "temperaturevalues.pcap-1", "temperaturevalues.pcap-2"]

    readings = []

    for files in pcapfiles:
        pkts = rdpcap(files)

        for p in pkts:
            time = p.time
            readings = json.loads(p.load)
            print("%s,%s,%s,%s,%s" % 
                (time, 
                readings[0]["sensor"],readings[0]["temp"],readings[0]["humidity"],
                readings[1]["sensor"],readings[1]["temp"],readings[1]["humidity"],
                )
            )

Running

$ python process.py  > readings.csv

Gives me a csv file with the temperature and humidity data from the sensors. Feeding this to gnuplot with something like the below results in a nice(albeit noisy) plot of the temperature from the two sensors.

set datafile sep ','
set timefmt "%s"
set format x "%m/%d/%Y %H:%M:%S"
set xdata time

set terminal png size 3000,500
set output 'data.png'

plot 'temperaturedata.csv' using 1:3 with lines, 'temperaturedata.csv' using 1:6 with lines

Are you awake?

It said

Are you awake? Read a blog!

And I was awake, so I opened the blog. It was about baseball.

Instead I read an actual blog post , another one about the RSGB convention. Then I looked at this bytebeat album . Fuck baseball.


Reading: Litte Brother, Transmetropolitan