I am trying to use python and ctypes to use the fuzzy.dll from ssdeep. So far all I have tried fails with and access violation error. Here is what I do after changing to the proper directory which contains the fuzzy.dll and fuzzy.def files.
>>> import os,sys
>>> from ctypes import *
>>> fn = create_string_buffer(os.path.abspath("fuzzy.def"))
>>> fuzz = windll.fuzzy
>>> chash = c_char_p(512)
>>> hstat = fuzz.fuzzy_hash_filename(fn,chash)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
WindowsError: exception: access violation writing 0x00000200
>>>
From what I understand, I have passed the proper c_types. From fuzzy.h
extern int fuzzy_hash_filename(char * filename, char * result)
I just cannot get past that access violation. Thank you in advance.