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
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: [], |
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
/* | |
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. | |