Skip to content

A clipboard history program that encrypts and saves data in a database file.

License

Notifications You must be signed in to change notification settings

pnbalaji/VancedCBHist

Repository files navigation

Vanced CB Hist

A clipboard history program built 100% with Python.

Getting Started

To run this program, it is recommended to use a tmux session. If you cannot use tmux, it's okay. You can run Vanced CB Hist in the background by adding the & suffix.

Running with Tmux

me@my-MBP ~ $ tmux

This will start a Tmux session.

View Output
me@my-MBP ~ $ █










[0] 0:zsh\* "my-MBP" 12:25 03-Mar-21

In the Tmux session, cd into the project directory (cloned from GitHub).

me@my-MBP ~ $ cd /path/to/VancedCBHist/

If you want, create a virtual environment.

me@my-MBP …Hist $ python3 -m pip install -U virtualenv # optional
me@my-MBP …Hist $ virtualenv venv # optional
me@my-MBP …Hist $ source ./venv/bin/activate # unix, optional
me@my-MBP …Hist $ .\venv\Scripts\activate # windows, optional

Now, install the requirements.

(venv) me@my-MBP …Hist $ python3 -m pip install -r requirements.txt
(venv) me@my-MBP …Hist $ python3 -m pip install -U windows-curses # windows, required

Now you can run cbhist.py.

Method 1 cbhist.py can be used as a CLI.
(venv) me@my-MBP …Hist $ python3 cbhist.py -p <password> -o <output_db>.<db|sqlite3>
Method 2 You can also run cbhist.py and fill out the information.
(venv) me@my-MBP …Hist $ python3 cbhist.py
password [default=VancedCBHist]:
hit enter to select the folder to put the output database in.
please enter the filename of the output database: clipboard.db

When cbhist.py has started running, you can detach from the shell session by pressing CTRL + B to enter command mode, and then D.

Running in a Standard Shell Session

cd into the project directory.

me@my-MBP ~ $ cd /path/to/VancedCBHist/

Now you should be inside the cloned project directory. If you want, create a virtual environment.

me@my-MBP …Hist $ python3 -m pip install virtualenv # optional
me@my-MBP …Hist $ virtualenv venv # optional
me@my-MBP …Hist $ source ./venv/bin/activate # unix, optional
me@my-MBP …Hist $ .\venv\Scripts\activate # windows, optional

Now, install the requirements.

(venv) me@my-MBP …Hist $ python3 -m pip install -r requirements.txt
(venv) me@my-MBP …Hist $ python3 -m pip install -U windows-curses # windows, required

You are ready to run cbhist.py now.

(venv) me@my-MBP …Hist $ python3 cbhist.py -p <password> -o <output_db>.<db|sqlite3> &

This should start running cbhist.py in the background. Now you can exit the terminal.

(venv) me@my-MBP …Hist $ exit

Using the GUI Application

boxgui.py (the box in boxgui.py stands for pymsgbox, as the GUI was developed with pymsgbox) is a GUI version of decrypt_db.py. This program checks for updates, so it is recommended to run this file once in a while. To decrypt a database with boxgui.py, follow the steps below.

(venv) me@my-MBP …Hist $ python3 boxgui.py

This command should launch something like this.

gui-start-screen.png

If you see something like this instead, go ahead and update Vanced CB Hist.

gui-update-screen.png

Once you click "Decrypt a Database", you will be prompted to open an encrypted database file. Now, select a database.

gui-select-in.png

Once you select the input database file, you will be prompted to select the output one. Select where to save the output database and continue to the next step.

gui-select-out.png

Now you will see this screen. If you have a really big database and you want to get a string you copied yesterday, you don't have to wait for hours to decrypt the whole database. You can enter something like 30 or 50 here to get the last 30 or 50 values added to the database. If you want to decrypt all the values from the selected database, enter -1 and continue. If you want to decrypt the last n values, enter the number n and continue.

gui-get-vals-screen.png

When you see this screen, select "Yes" to start decrypting the database.

gui-start-decrypting.png

If you see this screen, it means the password stored in the program does not match the password of the value in the database. At first, the password is set to an empty string. Click "OK" and continue.

gui-pwd-input.png

Now you have to enter the password. Enter it and hit the Return/Enter key.

gui-pwd-input-real.png

Once the values are done decrypting, you will see this screen if you've decrypted all of the values.

gui-all-done.png

If you've decrypted a certain number of values, you will see something like this.

gui-n-done.png

CLI Usage

cbhist.py Usage

(venv) me@my-MBP …Hist $ python3 cbhist.py -h
usage: cbhist.py [-h] [-p PWD] [-o OUTPUT]

a tool to encrypt and save clipboard history in a database

optional arguments:
  -h, --help            show this help message and exit
  -p PWD, --pwd PWD     password to encrypt with
  -o OUTPUT, --output OUTPUT
                        output database file

decrypt_db.py Usage

(venv) me@my-MBP …Hist $ python3 decrypt_db.py -h
usage: decrypt_db.py [-h] [-i INPUT] [-o OUTPUT] [-g GET_VALS]

a tool to decrypt a Vanced CB Hist database

optional arguments:
  -h, --help            show this help message and exit
  -i INPUT, --input INPUT
                        input database file (encrypted)
  -o OUTPUT, --output OUTPUT
                        output database file
  -g GET_VALS, --get-vals GET_VALS
                        the number of values to get from the database [-1=all]

Credits

Developer: Pranav Balaji Pooruli
Publisher: Balaji Pooruli Neelakantan

About

A clipboard history program that encrypts and saves data in a database file.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages