Skip to content

Add PhotoRec image minimum filters#206

Open
mfaizanchaki wants to merge 1 commit into
cgsecurity:masterfrom
mfaizanchaki:codex/photorec-image-min-filters
Open

Add PhotoRec image minimum filters#206
mfaizanchaki wants to merge 1 commit into
cgsecurity:masterfrom
mfaizanchaki:codex/photorec-image-min-filters

Conversation

@mfaizanchaki
Copy link
Copy Markdown

Summary

  • add PhotoRec options for minimum image width, height, width*height pixels, and file size
  • populate JPG/PNG dimensions during header checks and enforce the image filters before recovery starts
  • expose the settings through the ncurses options menu, /cmd batch mode, logs, and session save output

Batch usage example:

options,image_min_width,1024,image_min_height,768,image_min_pixels,786432,image_min_filesize,1048576,search

Fixes #167.

Testing

  • ./configure
  • make -j2
  • make check
  • PhotoRec smoke test with a raw image containing 1x1 JPG and PNG files: unfiltered recovery found both files
  • PhotoRec smoke test with image_min_width=2,image_min_height=2,image_min_pixels=4,image_min_filesize=10000 rejected both files
  • PhotoRec smoke test with image_min_filesize=10000 rejected both files through the existing file-too-small validation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Establish minimum sizes when recovering images

1 participant