Skip to content

Instantly share code, notes, and snippets.

@gabonator
gabonator / alifeng.js
Created December 2, 2017 12:01
Ali tech stb (abcom cryptobox) protocol including RTSP video streaming to VLC
var net = require('net');
const zlib = require('zlib');
Ali =
{
_decompress: (buffer, handler) => zlib.unzip(buffer, {}, (err, buffer) => err ? handler() : handler(buffer.toString())),
_alibuffer: (buffer) => "Start" + ("0000000" + buffer.length).substr(-7) + "End" + buffer,
_alijson: (json) => Ali._alibuffer(JSON.stringify(json)),
_requestBytes: 0,
_responseBuffers: [],
@gabonator
gabonator / abcom_protocol.js
Created November 26, 2017 20:05
ABcom satellite settop box protocol reverse engineering
/*
reverse engineering of ABcom Cryptobox 600HD mini dvbs box protocol
Firstly I examined android package (since it was easier to get it) "g-mscreen-2-3-11.apk". It
uses C++ library for implementing control protocol. Then I was trying to capture UPnP communication
from iphone connected to OSX running wireshark. But without luck. GMScreen allowed to connection
to box using ip address and port. This traffic was easier to caputre and analyse. Requests by
client application are human readable json/xml code. Some response packets are compressed using
zlib.