Skip to content

Commit

Permalink
Merge pull request #58 from z3r0privacy/mul21_add-seed_8952
Browse files Browse the repository at this point in the history
Add PikaBot variant of mul21_add
  • Loading branch information
herrcore authored Feb 14, 2024
2 parents 0198ff0 + cd1b331 commit ec514df
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 ec514df

Please sign in to comment.