0

I have found many topics that get me close to what I want to accomplish such as printf but out of a 1.7GB file I get a 12 byte output file. lol

Such as -

printf '%x\n' $(< input.txt) > output.txt

I have a large file containing 8 digit numbers.

01234567

Hex values: 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37

I really want: Hex values: 0x00, 0x01, 0x02, 0x03, 0x04, 0x04, 0x06, 0x07

input file and output file

Thank you!

Eddiie
  • 15
  • 3
  • I think I answered my own question. – Eddiie Nov 15 '21 at 04:16
  • There are a couple of python scripts... By tinkering around, I found XOR 0x30 will get the results I want, ... [link](https://stackoverflow.com/questions/5037762/xor-each-byte-with-0x71) Changed the 0x71 to 0x30. Also trying another script, [link](https://samsclass.info/124/proj14/VPxor.htm) for k, the key, the last agrument, I entered 0 (which is 0x30) because I could not understand how to enter $'\x30' without an error. – Eddiie Nov 15 '21 at 04:53

1 Answers1

0

There are a couple of python scripts... By tinkering around, I found XOR 0x30 will get the results I want, ...

link

Changed the 0x71 to 0x30.

Also trying another script, link

for k, the key, the last agrument, I entered 0 (which is 0x30) because I could not understand how to enter $'\x30' without an error.

Eddiie
  • 15
  • 3