79422767

Date: 2025-02-08 07:22:25
Score: 2
Natty:
Report link

thank you for answer it is work fine. Manually it was impossible for me to do this and you have helped me a lot

But It didn't create input.bin and there was a problem, but it didn't matter.

I changed it to

 import os

CHUNK = 2048
PADDING = b'\xff' * 64
INPUT_SIZE = 0x8000000  # 128MiB 

# Generate example input
# with open('input.bin', 'wb') as file:
#   for addr in range(0, INPUT_SIZE, 4):  # 128MiB
#      file.write(addr.to_bytes(4))

# Add FF chunks.
with open('input.bin', 'rb') as infile, open('output.bin', 'wb') as outfile:
    for _ in range(0, os.path.getsize('input.bin'), CHUNK):
        chunk = infile.read(CHUNK)
        outfile.write(chunk)
        outfile.write(PADDING)
 

thank you

Reasons:
  • Blacklisted phrase (0.5): thank you
  • Blacklisted phrase (1): helped me a lot
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Naser Irani Irani