My company uses DRM software (NASCA) for file encryption/protection that is hooked deep into the OS. I’d like to detect whether a file has been encrypted or not, in Python.
An easy way would be checking for whether the file begins with <## NASCA DRM FILE - VER1.00 ##>
as all of our encrypted files do.
However, due to the DRM software rules, when reading a DRM’d file into Python (as in open(file, "rb") as handle:
), Python may or may not receive the unencrypted file. Thus, in these circumstances, I cannot check for the existence of the NASCA header.
Is there some other way to read a DRM’d file (in Python) and ensure it that it remains encrypted?