I'm trying to write a bash script that, given a file in this form, detects that in this file there is an hidden image:
[random data][image file][random data]
My first approach is to search with grep for
[random data][image header][random data][image footer][random data]
in the file, but I can't found a table with all headers and footers of all image file formats. Does someone have this table, or can you suggest another way to proceed?