From 97fab468d9a3c7c16ed027fa4bc108d3756e9ced Mon Sep 17 00:00:00 2001 From: Xusheng Date: Sat, 30 Aug 2025 16:07:22 +0800 Subject: [PATCH] Added custom_shift_add --- algorithms/custom_shift_add.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 algorithms/custom_shift_add.py diff --git a/algorithms/custom_shift_add.py b/algorithms/custom_shift_add.py new file mode 100644 index 0000000..0490c6c --- /dev/null +++ b/algorithms/custom_shift_add.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python + +DESCRIPTION = "shift+add with a custom initial value seen in a malware." +TYPE = "unsigned_int" +TEST_1 = 4294890437 + + +def hash(data): + result = 0x733e14f + for val in data: + result = (result << 1) + val + result &= 0xffffffff + return result