Hex
Hex
def main():
file_path = input("Enter the path of the file to decode (default:
inboxrules.txt): ") or "inboxrules.txt"
while True:
print("\nMenu Options:")
print("1 - Decode file and save as inboxrules_decoded.txt in C:\\")
print("2 - Encode modified file and save with same coding as
inboxrules.txt")
print("3 - Exit")
choice = input("Choose an option (1, 2, or 3): ")
if choice == '1':
decode_and_save(file_path)
elif choice == '2':
new_file_path = input("Enter the path of the modified decoded file: ")
encode_and_save(new_file_path, file_path)
elif choice == '3':
print("Exiting...")
break
else:
print("Invalid choice. Please choose 1, 2, or 3.")
if __name__ == "__main__":
main()