This file contains hidden or 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
| function loadScript(url, handler) | |
| { | |
| window.collected = []; | |
| window._ = function(json) | |
| { | |
| window.collected.push(json); | |
| } | |
| var head = document.getElementsByTagName('head')[0]; |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | |
| <script src="https://code.highcharts.com/highcharts.js"></script> | |
| <script src="https://code.highcharts.com/highcharts-more.js"></script> | |
| </head> | |
| <body> | |
| <div id="chart" style="width:100%; height:100%;"></div> | |
| </body> |
This file contains hidden or 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
| #include <stdio.h> | |
| int levs[15] ={1,0,4,5,6,7,8,9,10,11,} | |
| int levcode(int i) | |
| { | |
| _ES=0xf000; | |
| asm mov bx, i | |
| asm mov ax, es:[bx] | |
| asm add al, es:[bx+0f000h] | |
| asm sub ah, es:[bx+0f002h] |
This file contains hidden or 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
| // Reader | |
| template<typename T> T GetVlc(const char*& p, const char* pChunkEnd) | |
| { | |
| uint8_t b; | |
| int nBit = 0; | |
| uint32_t i = 0; | |
| do | |
| { | |
| if (p > pChunkEnd) | |
| { |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> | |
| <script src="https://code.highcharts.com/highcharts.js"></script> | |
| <script src="https://code.highcharts.com/highcharts-more.js"></script> | |
| </head> | |
| <style> | |
| #schemecontainer {width:600px; height:580px; float:left; margin-right:20px;} |
This file contains hidden or 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 dateTime = require("node-datetime"); | |
| var dns = require("dns"); | |
| function currentTime() | |
| { | |
| return dateTime.create().format('Y-m-d H:M:S'); | |
| } | |
| function hostname(ip, handler) | |
| { |
This file contains hidden or 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'); | |
| var tunnel = null; | |
| var target = null; | |
| // tunnel server | |
| var serverInfo = {port:8811, host:"public.server.com"}; | |
| // target device we want to access on network where this script is running | |
| var targetInfo = {port:1001, host:"ip.local.network"}; | |
| function listen() |
This file contains hidden or 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. | |
This file contains hidden or 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
| function getNonconstantLength(buffer, i) | |
| { | |
| for (var l = 0; l < buffer.length - i; l++) | |
| { | |
| if (buffer[i+l] == buffer[i+l+1] && buffer[i+l+1] == buffer[i+l+2]) | |
| return l; | |
| } | |
| return buffer.length - i; | |
| } |
This file contains hidden or 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: [], |