Skip to content

Password updater for KeePass, KeePassX, KeePassXC(kdbx), pass, Chrome, Password Safe.

Notifications You must be signed in to change notification settings

1uckyPh4nt0m/PassUp

Repository files navigation

PassUp

Automatically update passwords from common Password Managers. Supported Password Managers are:

Getting Started

Prerequisites

  1. Install Node.js and Node package manager. Please refer tohttps://nodejs.org/en/download/for more information.

    sudo apt install nodejs npm
    
  2. InstallNightwatch:

    npm install -g nightwatch
    
  3. Install Browser and WebDriver:

    Either install Firefox or Chrome.

  4. InstallRust:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  5. Optional for Chrome password manager

    Install Openssl and Sqlite

    sudo apt install libssl-dev pkg-config libsqlite3-dev
    

Prerequisites (Ubuntu)

The following commands can be run on Ubuntu to install required packages:

sudo apt install nodejs nodejs-legacy npm libssl-dev pkg-config libsqlite3-dev
npm install -g nightwatch
npm install geckodriver --save-dev
npm install chromedriver --save-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Program Usage

Compile and Run

Compile the package and all the dependencies:

cargo build

Run the program:

cargo run -- [Program arguments]

Whether or not the browser is executed in headless mode, can be changed innightwatch.conf.js.To disable headless mode comment the'-headless'argument out for the desired browser, see SectionNightwatch Configurationfor additional information.

Program Arguments

Argument Description
-c, --config <FILE> Where <FILE> points to the TOML configuration file.
-h, --help Prints help information
-V, --version Prints version information

Configuration file

Allows you to choose between the browser to be used and the password manager variant.

Example configuration file:

active_profile="my-private-keepassx"
browser_type="firefox"#browser_type = "chrome"
nr_threads=10#optional default: 1

[profile.my-private-keepassx]
type="kdbx"
sources= ["private-kdbx"]

[profile.work-pass]
type="pass"
sources= ["work-pass"]#optional

[[sources]]
name="private-kdbx"
file="tests/resources/test_db.kdbx"
blocklist= ["google","yahoo"]#optional

[[sources]]
name="work-pass"
blocklist= ["google"]#optional

[[scripts]]
dir="./scripts"
blocklist= ["live.js"]#optional

[urls]#optional
"([^/]{1,30}://)?[^/]+gmail (/$|/.*)"="myaccount.google.js"
"skype /"="live.js"
"(https://)?lichess.org(/([a-z]|[A-Z]|[0-9])*)*"="lichess.org"
"non-domain-name-in-DB-file"=""

[[scripts]]
dir="development/my-custom-PassUp-scripts"

The configuration file has to be written and saved in theTOMLformat.

Allowed configuration parameters:

  • browser_type:[ "firefox", "chrome" ]
  • profile.type:[ "kdbx", "pass", "pwsafe", "chrome-gnome", "chrome-kde" ]

The[urls]section is used to match the correct script to any URL that is provided through the password database.

Nightwatch Configuration

An example configuration can be found innightwatch.conf.js.It provides two test settings which arefirefoxandchrome.

In the Nightwatch configuration file we can add arguments which are passed to the executed browser.

Here is an example for arguments which are passed to Firefox:

'moz:firefoxOptions': {
args: [
'-headless',
//'-verbose'
],
}

and for Chrome:

chromeOptions: {
args: [
'--headless'
]
}

For debugging purpuses it can be very beneficial to remove/comment out the'-headless'argument.

Nightwatch Debugging

While writing Nightwatch scripts it can be helpful to test them seperatly.

You can test a single script by executing:

nightwatch --env test_setting --test url username old_password new_password

Settest_settingaccording to the Nightwatch Configuration. For the example configuration it has to be eitherfirefoxorchrome. Seturl,username,old_passwordandnew_passwordto the according values.

Limitations

Anti-bot measures are a problem since they block us from accessing the account. An example would be theGoogle Account.The server blocks our request since it detects bot activity.

Useful Features

We support the cloning of entries for kdbx-based databases. A clone only contains references to the origin and not the values. The references are dereferenced and the values are copied to the clone, seeresolve_references.

You can change the password generation parameters inget_pw.Please refer to thepasswordscrate for additional information.

About

Password updater for KeePass, KeePassX, KeePassXC(kdbx), pass, Chrome, Password Safe.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published