From 7cbd105b6a39fd7244e24529c1bd45c56277634e Mon Sep 17 00:00:00 2001 From: malwarefrank Date: Fri, 14 Sep 2018 15:55:27 -0400 Subject: [PATCH] Fix Machoc file hash. Null bytes were being dropped. --- machoke.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/machoke.py b/machoke.py index 62a140c..f216c26 100755 --- a/machoke.py +++ b/machoke.py @@ -72,8 +72,8 @@ def process_machoke(self): for function in functions: machoke = self.get_machoke_from_function(function) self.machoke_line = "{}{}".format(self.machoke_line, machoke) - self.mmh3_line = "{}{}".format(self.mmh3_line, - hex(mmh3.hash(machoke) & 0xFFFFFFFF).replace("0x", "").replace("L", "")) + self.mmh3_line = "{}{:08x}".format(self.mmh3_line, + mmh3.hash(machoke) & 0xFFFFFFFF) self.rdeux.quit() def kill(self, message):