Skip to content

Instantly share code, notes, and snippets.

View reo-ar's full-sized avatar
🐒
On a break

reo-ar

🐒
On a break
  • Daybreak Frontline
View GitHub Profile
sources:
gist
import os
def curse_hasher(mod):
with open(mod, "rb") as mod_file:
file_bytes = mod_file.read()
length = sum(byte not in (0x9, 0xA, 0xD, 0x20) for byte in file_bytes)
seed = 1
h = seed ^ length
import os
async def curse_hasher(mod):
with open(mod, "rb") as mod_file:
file_bytes = mod_file.read()
blocklist = (0x9, 0xA, 0xD, 0x20)
length = sum(byte not in blocklist for byte in file_bytes)
seed = 1