Skip to content

Commit

Permalink
update README.md and code
Browse files Browse the repository at this point in the history
  • Loading branch information
seVenVo1d committed Feb 1, 2023
1 parent 8cec263 commit ea3bff7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can install the FFLocker via `pip`

python3 -m pip install fflocker

or by directly cloning to your desired directory.
or by directly cloning to your desired directory

git clone https://github.com/seVenVo1d/FFLocker.git

Expand Down
44 changes: 22 additions & 22 deletions fflocker/file_locker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import secrets
import sys

from string import ascii_letters
from time import sleep

Expand Down Expand Up @@ -194,25 +195,24 @@ def run_filelocker_decryption():
print('Please enter the correct password')


def run_filelocker():
print('Starting File Locker...')
for _ in range(15):
sys.stdout.write(next(spinner))
sys.stdout.flush()
sleep(0.1)
sys.stdout.write('\b')
print('Do you want to encrypt or decrypt the file?')
print('[e]: encrypt\t[d]: decrypt')
flag_method = True
while flag_method:
answer = input('')
if answer != 'e' and answer != 'd':
print('ERROR: Please type one of the commands given above!')
else:
flag_method = False
if answer == 'e':
run_filelocker_encryption()
elif answer == 'd':
run_filelocker_decryption()

run_filelocker()
# ========== fflocker.file_locker ==========

print('Starting File Locker...')
for _ in range(15):
sys.stdout.write(next(spinner))
sys.stdout.flush()
sleep(0.1)
sys.stdout.write('\b')
print('Do you want to encrypt or decrypt the file?')
print('[e]: encrypt\t[d]: decrypt')
flag_method = True
while flag_method:
answer = input('')
if answer != 'e' and answer != 'd':
print('ERROR: Please type one of the commands given above!')
else:
flag_method = False
if answer == 'e':
run_filelocker_encryption()
elif answer == 'd':
run_filelocker_decryption()
44 changes: 22 additions & 22 deletions fflocker/folder_locker.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import secrets
import shutil
import sys

from pathlib import Path
from string import ascii_letters
from time import sleep
Expand Down Expand Up @@ -238,25 +239,24 @@ def run_folderlocker_decryption():
shutil.rmtree(encfolderPATH[:-3], ignore_errors=True)


def run_folderlocker():
print('Starting Folder Locker...')
for _ in range(15):
sys.stdout.write(next(spinner))
sys.stdout.flush()
sleep(0.1)
sys.stdout.write('\b')
print('Do you want to encrypt or decrypt the folder?')
print('[e]: encrypt\t[d]: decrypt')
flag_method = True
while flag_method:
answer = input('')
if answer != 'e' and answer != 'd':
print('ERROR: Please type one of the commands given above!')
else:
flag_method = False
if answer == 'e':
run_folderlocker_encryption()
elif answer == 'd':
run_folderlocker_decryption()

run_folderlocker()
# ========== fflocker.folder_locker ==========

print('Starting Folder Locker...')
for _ in range(15):
sys.stdout.write(next(spinner))
sys.stdout.flush()
sleep(0.1)
sys.stdout.write('\b')
print('Do you want to encrypt or decrypt the folder?')
print('[e]: encrypt\t[d]: decrypt')
flag_method = True
while flag_method:
answer = input('')
if answer != 'e' and answer != 'd':
print('ERROR: Please type one of the commands given above!')
else:
flag_method = False
if answer == 'e':
run_folderlocker_encryption()
elif answer == 'd':
run_folderlocker_decryption()

0 comments on commit ea3bff7

Please sign in to comment.