So I have .bin file and I want to read it. I tried using .readFileSync("file.bin"), but I get strange console.log (when I try to log certain element) as I understand I get bytes.
Can someone tell me how do I get these values in array for example:
04 40 10 01 0a 1a 10 02 10 03 0d 02 0d 03 05 03 05 03 05 03 05 03 0f 32 0e 12 11 02 07 e6 0b 00
Code:
const fs = require('fs'); //file sysyem = fs
const decryptor = fs.readFileSync('./docs/decryptor.bin');
console.log(decryptor)
console.log(decryptor[0])
So the first log I get is :
<Buffer 04 40 10 01 0a 1a 10 02 10 03 0d 02 0d 03 05 03 05 03 05 03 05 03 0f 32 0e 12 11 02 07 e6 0b 00>
And for second one I get:
4