-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from AFranzo/lokibot
added lokibot hashing algorithm
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python | ||
|
||
DESCRIPTION = """ | ||
Author= IlFranz | ||
This algorithm was used by Loki/LokiBot for API hashing | ||
Sample SHA256: 75af30d10a4a60bb1b260a0f4f9e3410448bd81328737678937145aa88eee108 | ||
""" | ||
TYPE = 'unsigned_int' | ||
|
||
TEST_1 = 4064566081 | ||
|
||
|
||
def hash(data): | ||
hash_value = 0xFFFFFFFF | ||
for char in data: | ||
hash_value ^= char | ||
for _ in range(8): | ||
if hash_value & 1: | ||
hash_value ^= 0x4358AD54 | ||
hash_value >>= 1 | ||
return ~hash_value & 0xFFFFFFFF |