Skip to content

Commit

Permalink
UI patches
Browse files Browse the repository at this point in the history
  • Loading branch information
brodante committed May 25, 2024
1 parent 7a4893d commit 16d3eb8
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 9 deletions.
Binary file modified assets/hashify.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/identify_hash.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/snapshots/decry - decrypting test file.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/snapshots/encry - encrypting test file.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/snapshots/hashify.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/snapshots/identify hash.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/snapshots/main menu.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/snapshots/test1 after enc.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/snapshots/test1 before enc.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion main py/FKeys/test1.txt_file.key
Original file line number Diff line number Diff line change
@@ -1 +1 @@
kDiRqIL9-0dJhJIwaKytEwptsKjro3oZ4Rp9wOe9vB8=
vtVEf-f8FK0oJoc0yhDoqEWpeKP2WFthjdvcYNGL3z4=
12 changes: 10 additions & 2 deletions main py/Fdecry.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import os
import sys
from cryptography.fernet import Fernet
import time

def logo():
print("""\n
Expand Down Expand Up @@ -37,6 +38,7 @@ def load_key(key_path=None, file_path=None):
return key_file.read()
else:
print("No key found in the default folder. Please provide the key or path of the key.")
time.sleep(3)
sys.exit(1)

def decrypt_file(encrypted_file_path, key):
Expand Down Expand Up @@ -68,6 +70,7 @@ def Fdecry():

if not os.path.exists(path):
print("Error: The provided path does not exist.")
time.sleep(3)
sys.exit(1)

key_input = input("Enter the path of the key file or leave blank to use default key folder: ")
Expand All @@ -81,16 +84,21 @@ def Fdecry():
with open(decrypted_file_path, 'wb') as decrypted_file:
decrypted_file.write(decrypted_data)

print("Decryption completed.")
for remaining in range(3, 0, -1):
print(f"\033[96mDecryption completed\033[0m. Returning in \033[96m{remaining}...\033[0m", end="\r")
time.sleep(1) # Wait for 1 second

# Delete the encrypted file after successful decryption
os.remove(path)
elif os.path.isdir(path):
# Decrypt folder
decrypt_folder(path, key)
print("Folder decryption completed.")
for remaining in range(3, 0, -1):
print(f"\033[96mDecryption completed\033[0m. Returning in \033[96m{remaining}...\033[0m", end="\r")
time.sleep(1) # Wait for 1 second
else:
print("Error: The provided path is neither a file nor a directory.")
time.sleep(3)
sys.exit(1)

# if __name__ == "__main__":
Expand Down
5 changes: 4 additions & 1 deletion main py/Fencry.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import os
import sys
from cryptography.fernet import Fernet
import time

def logo():
print("""\n
Expand Down Expand Up @@ -103,7 +104,9 @@ def Fencry():
print("Error: The provided path is neither a file nor a directory.")
sys.exit(1)

print("Encryption completed.")
for remaining in range(3, 0, -1):
print(f"\033[91mEncryption completed\033[0m. Returning in \033[96m{remaining}...\033[0m", end="\r")
time.sleep(1) # Wait for 1 second

# if __name__ == "__main__":
# main()
5 changes: 0 additions & 5 deletions testing/test1.txt

This file was deleted.

1 change: 1 addition & 0 deletions testing/test1.txt.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
gAAAAABmUfmdTj2CKuPH9tjy7aGWk5eFkDRg_QFR3i-2w70yVOucL8BRRum5gEDpYII7w2HE7Owgm99dXlM5D4c6gxoEAgUJiAZh0Kvbngo6LiYyPo-Om9U-yBb6ZSXdZYjPmMP08hGP8md0HxENOba-7q1IEmCubd2iR8-9MCWxcU4g7ANGklmQpQNzWL5igcMXu0B4Ajg_0mnk7j8WUTI9hnKzaewXIVarzoQLuGAsQm8Twvgd1DMpDvgohqE2UWYfZZuIAKCe7ZoD9o1SlZKvHVc9rsvIqMvrzMWwg25D4rum3_fOsXxWkJ0GW4CacdXAZ5yhJpbvwcVrJFTgKJUTIFb7hfbjRwmw6NAwhu9CXHc9USPiGOu5IlEJo6u9GjVBSr7xit-e3taPtvxHs5tpjXHYtfHlpoeogQ9twq1lClU7GAfzGFjMei4N5wPORUAquI8IlPcuVkpTmXTmEZEhQIJBR1XVQluffwhnS0SkehX_ADlFFka1mbL4VP2PzoQx_w-qQZ1G60JG4k2HYumcPxDj79ZDE_hcObBqhrGGMXtAJSi7x1LYu2zVEz6G3Wa1TmEbXBgCbCvEWYVkZo_w8B8B53WZ-plMDFd3_EIXf6naEo_27LUCbVCDUnzPk_0Z-cLI3W3208BrUTRzDk51WVoNF3iiojiM5K9bPl423yK29_kDTVensUJbWVPUsUuxCik4kta1HjHFeXaxM-bpt1tpFkPP-PcEIt9mkQP-1oJMAlgyOKE=

0 comments on commit 16d3eb8

Please sign in to comment.