Circlean/circlean_fs/root_partition/usr/local/bin/plugin_embeddedfile.py

22 lines
529 B
Python
Raw Normal View History

2015-11-06 17:40:33 +01:00
#!/usr/bin/env python
#2014/10/13
class cPDFiDEmbeddedFile(cPluginParent):
# onlyValidPDF = True
name = 'EmbeddedFile plugin'
def __init__(self, oPDFiD):
self.oPDFiD = oPDFiD
def Score(self):
if '/EmbeddedFile' in self.oPDFiD.keywords and self.oPDFiD.keywords['/EmbeddedFile'].count > 0:
if self.oPDFiD.keywords['/EmbeddedFile'].hexcode > 0:
return 1.0
else:
return 0.9
else:
return 0.0
AddPlugin(cPDFiDEmbeddedFile)