dfgen is a NodeJS command line interface that creates dummy files for testing purpose.
# local
npm install --save-dev dfgen
# global
npm install --global dfgen
# local
npx dfgen --help
# global
dfgen --help
dfgen --type pdf
dfgen --type pdf --text-content "This is a text content"
dfgen --type png --text-content "This is a text inside a png"
dfgen --type jpg --width-height "500/200" --text-content "This is a text inside a 500px * 200px jpg "
# you can simply generate a file with a wrong extension
dfgen --type jpg --output image.gif
# you can also generate a file with an invalid signature
dfgen --type jpg --corrupt-signature invalid # this will replace the 4 first bytes with 0x00 0x01 0x02 0x03
# generate a file of 1.4 mb
dfgen --type jpg --file-size 1400000
# or
dfgen --type jpg --file-size 1.4mb