From cbc21cf767a30105aef31cfe1e69407249445317 Mon Sep 17 00:00:00 2001 From: holly-o <128481388+holly-o@users.noreply.github.com> Date: Fri, 13 Sep 2024 15:08:31 +0100 Subject: [PATCH] Update tools/bitlocker2hashcat.py Co-authored-by: kgolawski --- tools/bitlocker2hashcat.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/bitlocker2hashcat.py b/tools/bitlocker2hashcat.py index 19d0be2d7..f7501a37b 100644 --- a/tools/bitlocker2hashcat.py +++ b/tools/bitlocker2hashcat.py @@ -29,12 +29,13 @@ def guid_to_hex(guid): def hex_to_guid(hex_str): - guid_parts = [0] * 5 - guid_parts[0] = hex_str[0:8] - guid_parts[1] = hex_str[8:12] - guid_parts[2] = hex_str[12:16] - guid_parts[3] = hex_str[16:20] - guid_parts[4] = hex_str[20:] + guid_parts = [ + hex_str[0:8], + hex_str[8:12], + hex_str[12:16], + hex_str[16:20], + hex_str[20:], + ] guid = ''.join([guid_parts[0][i:i+2] for i in range(0, len(guid_parts[0]), 2)][::-1]) guid += '-'