Skip to content

Instantly share code, notes, and snippets.

@buptczq
buptczq / detect.py
Last active January 30, 2022 06:39
QQ URL detect
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