import hashlib import struct import sqlite3 def md5hash(buf): return hashlib.md5(buf.encode("utf-16")[2:]).digest() def md5cmp(buf, postfix, a1, a2, a3, a4): if len(buf) < postfix: return False index = 0 while index <= (len(buf)-postfix): md5 = md5hash(buf[index:index+postfix]) if md5 == struct.pack("