BASH: How to check if a file with a specific content is inside a png image
0
votes
0
answers
764
views
I have recently found a way to put files inside a PNG image without destroying the image using
cat example.png example.7z > example-combined.png
, which also works with standard ZIP archives. This puts the files inside the archive into the png file and stores that in the new PNG file which still shows the original image but if opened with e.g. 7zip reveals the files inside.
I want to know if there's a way to check if e.g. a text file named verified.txt with the text "I am Lampe2020" is inside that PNG file's archive section. Is that maybe possible without unpacking the whole thing, to make it quicker and less hard drive intensive?
Yes, I've seen https://unix.stackexchange.com/questions/645447/how-to-grep-inside-a-specific-file-in-tar-gz-without-extracting , but I am not sure if there's a way to do that with a PNG as I can't use tar
for a PNG archive.
Asked by Lampe2020
(115 rep)
Apr 4, 2022, 08:11 PM
Last activity: Apr 4, 2022, 08:43 PM
Last activity: Apr 4, 2022, 08:43 PM