So I'm trying to verify that files I'm getting (uploaded by the user) are indeed images, and valid.
I'm running ClamAV (using python's clamd
package) but it doesn't give back the actual file content.
I'm using python's magic
package in order to check the magic file prefix (as imghdr
also does for images),
But my worry is for files with image magic prefix that contains JS code for example.
Any idea about how can I scan the uploaded file's content in order to determine its type ?
Thank you