Skip to content

Commit

Permalink
Add PikaBot variant of mul21_add
Browse files Browse the repository at this point in the history
  • Loading branch information
z3r0privacy committed Feb 13, 2024
1 parent 0198ff0 commit cd1b331
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions algorithms/mul21_add_seed_8952.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python

DESCRIPTION = "MULTIPLY 0x21 and ADD (seed 8952), used in PikaBot in February 2024"
# Type can be either 'unsigned_int' (32bit) or 'unsigned_long' (64bit)
TYPE = 'unsigned_int'
# Test must match the exact hash of the string 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
TEST_1 = 0xDD4DE543


def hash(data):
h = 8952
for c in data:
if c > 96:
c -= 0x20
h = (c + 0x21*h) & 0xFFFFFFFF
return h

0 comments on commit cd1b331

Please sign in to comment.