Blitzortung is a website and platform that collects live lightning data using a collection of internet-connected sensors run by volunteers.


Mobile apps


There is a WebSocket server at wss:// After you connect to it, you need to send {"a": 111} to it in order to start streaming the messages.

Data obfuscation

The live data streamed from their WebSocket server is obfuscated. Below is a Python function that decodes it to proper JSON.

def decode(b):
    e = {}
    d = list(b.decode())
    c = d[0]
    f = c
    g = [c]
    h = 256
    o = h
    for i in range(1, len(d)):
        a = ord(d[i])
        a = d[i] if h > a else e[a] if e.get(a) else f + c
        c = a[0]
        e[o] = f + c
        o += 1
        f = a
    return ''.join(g).encode()