IPTV application update
From t-hack.com - Hack X300T / X301T
(application update information added) |
(part file decryption coded added) |
||
Line 33: | Line 33: | ||
A tool to decompress, decrypt, join and extract the PART files can be found here <<Link will be provided soon>> | A tool to decompress, decrypt, join and extract the PART files can be found here <<Link will be provided soon>> | ||
+ | |||
+ | |||
+ | here is the java code to decompress and decrypt PART files: | ||
+ | |||
+ | <pre>InputStream in = new FileInputStream("data/"+part.getName()); | ||
+ | if (part.isZlib()) | ||
+ | { | ||
+ | in = new InflaterInputStream(in); | ||
+ | } | ||
+ | |||
+ | int len = -1; | ||
+ | int partLength = 0; | ||
+ | while ( (len=in.read(buffer)) != -1) | ||
+ | { | ||
+ | for (int i = 0; i < len; i++) | ||
+ | { | ||
+ | byte a = (byte) ( (((int)buffer[i]) >> 5) & 0x07); | ||
+ | byte b = (byte) ( (((int)buffer[i]) << 3) & 0xF8); | ||
+ | byte c = (byte) (a | b); | ||
+ | byte d = (byte) (c ^ (partLength++ & 0xff)); | ||
+ | buffer[i] = d; | ||
+ | } | ||
+ | out.write(buffer, 0, len); | ||
+ | }</pre> |