From dabd566d71ee3fa44233fb12c338c41aab93a6cc Mon Sep 17 00:00:00 2001 From: p7mj Date: Wed, 28 Jan 2026 19:54:03 -0500 Subject: [PATCH] Uploaded the files A-1 versions of all three files have been attached --- sierra-security-combination-v-a-1.py | 100 ++++++++++++++++++++++++++ sierra-security-generation-v-a-1.py | 95 ++++++++++++++++++++++++ sierra-security-verification-v-a-1.py | 96 +++++++++++++++++++++++++ 3 files changed, 291 insertions(+) create mode 100644 sierra-security-combination-v-a-1.py create mode 100644 sierra-security-generation-v-a-1.py create mode 100644 sierra-security-verification-v-a-1.py diff --git a/sierra-security-combination-v-a-1.py b/sierra-security-combination-v-a-1.py new file mode 100644 index 0000000..041b4f3 --- /dev/null +++ b/sierra-security-combination-v-a-1.py @@ -0,0 +1,100 @@ +# ____ _ ____ _ _ +# / ___|(_) ___ _ __ _ __ __ _ / ___| ___ ___ _ _ _ __(_) |_ _ _ +# \___ \| |/ _ \ '__| '__/ _` | \___ \ / _ \/ __| | | | '__| | __| | | | +# ___) | | __/ | | | | (_| | ___) | __/ (__| |_| | | | | |_| |_| | +# |____/|_|\___|_| |_| \__,_| |____/ \___|\___|\__,_|_| |_|\__|\__, | P7MJ +# Combination V. A-1 |___/ 20260128 + +# Required imports: +import datetime, hashlib, uuid, sys + +# To use, call sierra(). If verification is successful, user will be able to proceed, if not the entire program will terminate. + +sierra_verification_chances = 3 + +def sierra_get_key(): # Get a key + while True: + try: + key = int(input("Enter a key (0-999) > ")) + if 0 <= key <= 999: + return f"{key:03d}" # Format as 3-digit with leading zeros + else: + print("Key must be between 0 and 999. Please try again.") + except ValueError: + print("Invalid input. Enter a number between 0 and 999.") + +def sierra_create_time_code(): # Get the 12-digit time code + now = datetime.datetime.now() + minutes = (now.minute // 15) * 15 # Quarter Hours + rounded_time = now.replace(minute=minutes, second=0, microsecond=0) + return rounded_time.strftime("%Y%m%d%H%M") #YYYYMMDDHHMM + +def sierra_create_key(key, time_code): # Combine key and time code + combined = f"{key}{time_code}" + hash_obj = hashlib.sha256(combined.encode()) + hash_hex = hash_obj.hexdigest() + namespace = uuid.NAMESPACE_DNS + name = combined.encode() + deterministic_uuid = uuid.uuid5(namespace, combined) + return str(deterministic_uuid) + +def sierra_verify(): + global sierra_verification_chances + key = sierra_get_key() + time_code = sierra_create_time_code() + correct_uuid = sierra_create_key(key, time_code) + user_uuid = input("Enter UUID > ").strip() + + # Compare + if user_uuid == correct_uuid: + print("Verification Successful.") + return True + else: + sierra_verification_chances -= 1 + print(f"Verification Failed. {sierra_verification_chances} chances left.") + +def sierra_create_uuid(): + key = sierra_get_key() + time_code = sierra_create_time_code() + generated_uuid = sierra_create_key(key, time_code) + + print(f""" +Generated Key and UUID: +Key: {key} +UUID: {generated_uuid} +""") + +def sierra(): + global sierra_verification_chances + print("=" * 80) + print("Sierra Security Combination Version A-1") + print("-" * 80) + + try: + while True and sierra_verification_chances > 0: + print("""Select a mode: +[1] Generate a UUID +[2] Verify a UUID +[3] Exit + """) + + choice = input("Enter your choice > ").strip() + + if choice == "1": + sierra_create_uuid() + elif choice == "2": + verification_result = sierra_verify() + if verification_result: + break + elif choice == "3": + print("Exiting.") + sys.exit(0) + else: + print("Error: Invalid choice.") + sys.exit(0) + except KeyboardInterrupt: + print("\nUser Terminated (Ctrl + C.)") + +if __name__ == "__main__": + sierra() +# ========================================================================================================== \ No newline at end of file diff --git a/sierra-security-generation-v-a-1.py b/sierra-security-generation-v-a-1.py new file mode 100644 index 0000000..f731356 --- /dev/null +++ b/sierra-security-generation-v-a-1.py @@ -0,0 +1,95 @@ +# ____ _ ____ _ _ +# / ___|(_) ___ _ __ _ __ __ _ / ___| ___ ___ _ _ _ __(_) |_ _ _ +# \___ \| |/ _ \ '__| '__/ _` | \___ \ / _ \/ __| | | | '__| | __| | | | +# ___) | | __/ | | | | (_| | ___) | __/ (__| |_| | | | | |_| |_| | +# |____/|_|\___|_| |_| \__,_| |____/ \___|\___|\__,_|_| |_|\__|\__, | P7MJ +# Generation V. A-1 |___/ 20260128 + +# Required imports: +import datetime, hashlib, uuid, sys + +# To use, call sierra(). If verification is successful, user will be able to proceed, if not the entire program will terminate. + +sierra_verification_chances = 3 + +def sierra_get_key(): # Get a key + while True: + try: + key = int(input("Enter a key (0-999) > ")) + if 0 <= key <= 999: + return f"{key:03d}" # Format as 3-digit with leading zeros + else: + print("Key must be between 0 and 999. Please try again.") + except ValueError: + print("Invalid input. Enter a number between 0 and 999.") + +def sierra_create_time_code(): # Get the 12-digit time code + now = datetime.datetime.now() + minutes = (now.minute // 15) * 15 # Quarter Hours + rounded_time = now.replace(minute=minutes, second=0, microsecond=0) + return rounded_time.strftime("%Y%m%d%H%M") #YYYYMMDDHHMM + +def sierra_create_key(key, time_code): # Combine key and time code + combined = f"{key}{time_code}" + hash_obj = hashlib.sha256(combined.encode()) + hash_hex = hash_obj.hexdigest() + namespace = uuid.NAMESPACE_DNS + name = combined.encode() + deterministic_uuid = uuid.uuid5(namespace, combined) + return str(deterministic_uuid) + +def sierra_verify(): + global sierra_verification_chances + key = sierra_get_key() + time_code = sierra_create_time_code() + correct_uuid = sierra_create_key(key, time_code) + user_uuid = input("Enter UUID > ").strip() + + # Compare + if user_uuid == correct_uuid: + print("Verification Successful.") + return True + else: + sierra_verification_chances -= 1 + print(f"Verification Failed. {sierra_verification_chances} chances left.") + +def sierra_create_uuid(): + key = sierra_get_key() + time_code = sierra_create_time_code() + generated_uuid = sierra_create_key(key, time_code) + + print(f""" +Generated Key and UUID: +Key: {key} +UUID: {generated_uuid} + """) + +def sierra(): + global sierra_verification_chances + print("=" * 80) + print("Sierra Security Generation Version A-1") + print("-" * 80) + + try: + while True and sierra_verification_chances > 0: + print("""Select a mode: +[1] Generate a UUID +[2] Exit + """) + + choice = input("Enter your choice > ").strip() + + if choice == "1": + sierra_create_uuid() + elif choice == "2": + print("Exiting.") + sys.exit(0) + else: + print("Error: Invalid choice.") + sys.exit(0) + except KeyboardInterrupt: + print("\nUser Terminated (Ctrl + C.)") + +if __name__ == "__main__": + sierra() +# ========================================================================================================== \ No newline at end of file diff --git a/sierra-security-verification-v-a-1.py b/sierra-security-verification-v-a-1.py new file mode 100644 index 0000000..6bb3f9f --- /dev/null +++ b/sierra-security-verification-v-a-1.py @@ -0,0 +1,96 @@ +# ____ _ ____ _ _ +# / ___|(_) ___ _ __ _ __ __ _ / ___| ___ ___ _ _ _ __(_) |_ _ _ +# \___ \| |/ _ \ '__| '__/ _` | \___ \ / _ \/ __| | | | '__| | __| | | | +# ___) | | __/ | | | | (_| | ___) | __/ (__| |_| | | | | |_| |_| | +# |____/|_|\___|_| |_| \__,_| |____/ \___|\___|\__,_|_| |_|\__|\__, | P7MJ +# Verification V. A-1 |___/ 20260128 + +# Required imports: +import datetime, hashlib, uuid, sys + +# To use, call sierra(). If verification is successful, user will be able to proceed, if not the entire program will terminate. + +sierra_verification_chances = 3 + +def sierra_get_key(): # Get a key + while True: + try: + key = int(input("Enter a key (0-999) > ")) + if 0 <= key <= 999: + return f"{key:03d}" # Format as 3-digit with leading zeros + else: + print("Key must be between 0 and 999. Please try again.") + except ValueError: + print("Invalid input. Enter a number between 0 and 999.") + +def sierra_create_time_code(): # Get the 12-digit time code + now = datetime.datetime.now() + minutes = (now.minute // 15) * 15 # Quarter Hours + rounded_time = now.replace(minute=minutes, second=0, microsecond=0) + return rounded_time.strftime("%Y%m%d%H%M") #YYYYMMDDHHMM + +def sierra_create_key(key, time_code): # Combine key and time code + combined = f"{key}{time_code}" + hash_obj = hashlib.sha256(combined.encode()) + hash_hex = hash_obj.hexdigest() + namespace = uuid.NAMESPACE_DNS + name = combined.encode() + deterministic_uuid = uuid.uuid5(namespace, combined) + return str(deterministic_uuid) + +def sierra_verify(): + global sierra_verification_chances + key = sierra_get_key() + time_code = sierra_create_time_code() + correct_uuid = sierra_create_key(key, time_code) + user_uuid = input("Enter UUID > ").strip() + + # Compare + if user_uuid == correct_uuid: + print("Verification Successful.") + return True + else: + sierra_verification_chances -= 1 + print(f"Verification Failed. {sierra_verification_chances} chances left.") + +def sierra_create_uuid(): + key = sierra_get_key() + time_code = sierra_create_time_code() + generated_uuid = sierra_create_key(key, time_code) + + print(f""" +Generated Key and UUID: +Key: {key} +UUID: {generated_uuid} + """) + +def sierra(): + global sierra_verification_chances + print("=" * 80) + print("Sierra Security Verification Version A-1") + print("-" * 80) + + try: + while True and sierra_verification_chances > 0: + print("""Select a mode: +[1] Verify a UUID +[2] Exit + """) + + choice = input("Enter your choice > ").strip() + if choice == "1": + verification_result = sierra_verify() + if verification_result: + break + elif choice == "2": + print("Exiting.") + sys.exit(0) + else: + print("Error: Invalid choice.") + sys.exit(0) + except KeyboardInterrupt: + print("\nUser Terminated (Ctrl + C.)") + +if __name__ == "__main__": + sierra() +# ========================================================================================================== \ No newline at end of file