https://github.com/qalle2/file-corruptor
Corrupt a file.
https://github.com/qalle2/file-corruptor
command-line corruptor python3 rom-hacking
Last synced: about 1 month ago
JSON representation
Corrupt a file.
- Host: GitHub
- URL: https://github.com/qalle2/file-corruptor
- Owner: qalle2
- License: gpl-3.0
- Created: 2018-08-10T13:10:06.000Z (almost 7 years ago)
- Default Branch: main
- Last Pushed: 2023-10-05T01:30:30.000Z (over 1 year ago)
- Last Synced: 2025-03-24T20:12:44.202Z (about 2 months ago)
- Topics: command-line, corruptor, python3, rom-hacking
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# file-corruptor
```
usage: corruptor.py [-h] [-c COUNT] [-m {f,i,a,r}] [-s START] [-l LENGTH] [-v]
input_file output_fileMake a corrupt copy of a file. The addresses to corrupt will be randomly
picked from the specified range (by default, from the entire file).positional arguments:
input_file The file to read.
output_file The file to write.options:
-h, --help show this help message and exit
-c COUNT, --count COUNT
Number of bytes to corrupt (default=1).
-m {f,i,a,r}, --method {f,i,a,r}
How to corrupt a byte: f = flip 1 bit (default), i =
invert all bits, a = add or subtract 1 (255 <-> 0), r
= randomize (any value but original).
-s START, --start START
Start of range to pick addresses from (0 or greater,
default=0).
-l LENGTH, --length LENGTH
Length of range to pick addresses from (0 = to end of
file, default=0).
-v, --verbose Print changes.
```