Python to obtain the ssdeep value of a file,
This article describes how to obtain the ssdeep value of a file using Python. The specific method is as follows:
First, to obtain the ssdeep value, you must first import ssdeep
An error occurred while installing pyssdeep on ubuntu. Later, we found that the apt-cache search "ssdeep" had several full apt-get install, but the problem remained.
Then download to the pyssdeep source file, tar zxvf pyssdeep.tar.zip, apt-get install python-dev, and then python setup. py install.
In general, it should be because python-dev is not installed.
The Code is as follows:
Def _ get_ssdeep (self, file_path): "Generates the ssdeep fuzzy hash of the file. @ return: ssdeep fuzzy hash of the file "if not IS_SSDEEP: return None try: return ssdeep. ssdeep (). hash_file (file_path) handle T: return None
I hope this article will help you with Python programming.