Offset | Size | Description |
---|---|---|
0x0 | 0x7 | Tinfoil Index Magic "TINFOIL" |
0x7 | 0x1 | Index Type Information (1) |
0x8 | 0x100 | Session Key (PKCS#1 OAEP encrypted randomly generated AES Key used to encrypt index) (2) |
0x108 | 0x8 | Unencrypted Index Size |
0x110 | X | Index Data |
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
-----BEGIN PUBLIC KEY----- | |
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvbwVD5LF4nzJAbWxoClm | |
gpnCTHgRrFayyadlBAxUiJwC+qLPCARNar+5LKuA9bs3LByMQ1+zOXwdaZVu5UJ0 | |
y1FDoOdjFJGF+5hB0vk6IUR8xajU/xQIL1UZ55l5pylZh8JqhcZ6T6vIV8PA5E2U | |
EI9cI+g8HqfSLyFUK61nsXttttloFGbI3JF+sXS/UaFyjxsea7hvWYGtHXzDAGle | |
B5Gkd5Ci0sY5hXqwR0qZgAe96Utf4IG8YaFD7Efl3mZ2IX5riKe0T67seg8wmPwv | |
SxdcO8xvxmoaUXylbCdbNeFsbu4Fz8RpxqvHx7kzg5EB0/JeDqBxjQdfOQreriWe | |
LQIDAQAB | |
-----END PUBLIC KEY----- |
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
import { createWriteStream } from 'fs'; | |
import { mkdir } from 'fs/promises'; | |
import { pipeline } from 'stream/promises'; | |
// https://stackoverflow.com/a/47767860/13157538 | |
const getURLExtension = url => { | |
return url.split(/[#?]/)[0].split('.').pop().trim(); | |
} | |
/** |