From 15f6bce46d25550100de559ab3472bb86227db85 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Tue, 23 Jul 2019 13:20:14 +0300 Subject: [PATCH] Create island_password_hasher.py Used for Monkey Island password hash see https://github.com/guardicore/monkey/wiki/Enabling-Monkey-Island-Password-Protection --- .../scripts/island_password_hasher.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 monkey/monkey_island/scripts/island_password_hasher.py diff --git a/monkey/monkey_island/scripts/island_password_hasher.py b/monkey/monkey_island/scripts/island_password_hasher.py new file mode 100644 index 000000000..159e0d098 --- /dev/null +++ b/monkey/monkey_island/scripts/island_password_hasher.py @@ -0,0 +1,23 @@ +""" +Utility script for running a string through SHA3_512 hash. +Used for Monkey Island password hash, see +https://github.com/guardicore/monkey/wiki/Enabling-Monkey-Island-Password-Protection +for more details. +""" + +import argparse +from Crypto.Hash import SHA3_512 + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("string_to_sha", help="The string to do sha for") + args = parser.parse_args() + + h = SHA3_512.new() + h.update(args.string_to_sha) + print(h.hexdigest()) + + +if __name__ == '__main__': + main()