nithinmanoj10 / password-SHAck

💼 Password Manager Toolkit
0 stars 0 forks source link

Clipboard Feature #10

Open nithinmanoj10 opened 1 year ago

nithinmanoj10 commented 1 year ago

Module for storing password on the clipboard for a particular amount of time

akshaykbiju commented 1 year ago

Functionality

The password will be stored on the clipboard and will not be displayed on the screen of the user. After 10 seconds, the password will be cleared from the clipboard. This is done to prevent adversaries from performing clipboard based attacks and acquiring the password.

The Initial Setup

We need to install two modules to implement this functionality. They are: Pyperclip - it is a cross-platform Python module for copy and paste clipboard functions. It can be installed by typing in the following command.

pip install pyperclip

Threading - it helps in concurrent running of different parts of your program. We will be using the Timer method of this module to clear the clipboard. it can be installed using the following command.

pip install threading

Algorithm

import pyperclip
import threading

def clearClipboard():
   pyperclip.copy(password)

   t = threading.Timer(10.0, user.clearCB)
   t.start()