From 8c2d02eccbdfae4755ba1e1b6ce67eb0e389f8b5 Mon Sep 17 00:00:00 2001 From: 5bentz <10729484+5bentz@users.noreply.github.com> Date: Sat, 7 Jul 2018 23:22:38 +0200 Subject: [PATCH 1/5] Update README for 1.0.2 release --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9da928b..d8512fb 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,11 @@ This piece of software wraps around the **[zx2c4 pass](http://www.zx2c4.com/proj #### Linux, MacOS, * BSD -Download the `install_host_app.sh` script from [our releases page](https://github.com/passff/passff-host/releases) and execute it. You can do this in one line like so: +Download the latest `install_host_app.sh` script from [our releases page](https://github.com/passff/passff-host/releases) and execute it. You can do this in one line like so: ``` -$ curl -sSL https://github.com/passff/passff-host/releases/download/1.0.1/install_host_app.sh | bash -s -- [firefox|chrome|opera|chromium|vivaldi] +$ VERSION=1.0.2 +$ curl -sSL https://github.com/passff/passff-host/releases/download/${VERSION}/install_host_app.sh | bash -s -- [firefox|chrome|opera|chromium|vivaldi] ``` This script will download the host application (a small python script) and the add-on's manifest file (a JSON config file) and put them in the right place. From 8533ed9f23f65e00fe3294acd40359af0319069b Mon Sep 17 00:00:00 2001 From: 5bentz <10729484+5bentz@users.noreply.github.com> Date: Fri, 7 Sep 2018 20:55:05 +0200 Subject: [PATCH 2/5] Explicitly call `pass show`, fix #27 --- src/passff.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/passff.py b/src/passff.py index 8e09bbb..96fd6e2 100755 --- a/src/passff.py +++ b/src/passff.py @@ -52,17 +52,18 @@ if __name__ == "__main__": std_input = None if len(receivedMessage) == 0: - pass + opt_args = ["show"] elif receivedMessage[0] == "insert": opt_args = ["insert", "-m"] pos_args = [receivedMessage[1]] std_input = receivedMessage[2] elif receivedMessage[0] == "generate": - pos_args = [receivedMessage[1], receivedMessage[2]] opt_args = ["generate"] + pos_args = [receivedMessage[1], receivedMessage[2]] if "-n" in receivedMessage[3:]: opt_args.append("-n") else: + opt_args = ["show"] key = receivedMessage[0] key = "/" + (key[1:] if key[0] == "/" else key) pos_args = [key] From 0ad769041cd72bde845b255964316b6c0a7e5fb4 Mon Sep 17 00:00:00 2001 From: Thomas Vogt Date: Sat, 8 Dec 2018 10:35:33 +0100 Subject: [PATCH 3/5] More explicit explanation of browser name argument --- README.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d8512fb..46de870 100644 --- a/README.md +++ b/README.md @@ -22,22 +22,23 @@ This piece of software wraps around the **[zx2c4 pass](http://www.zx2c4.com/proj #### Linux, MacOS, * BSD -Download the latest `install_host_app.sh` script from [our releases page](https://github.com/passff/passff-host/releases) and execute it. You can do this in one line like so: +Download the latest `install_host_app.sh` script from [our releases page](https://github.com/passff/passff-host/releases) and execute it. As an example, Firefox users can do this in one line like so: ``` $ VERSION=1.0.2 -$ curl -sSL https://github.com/passff/passff-host/releases/download/${VERSION}/install_host_app.sh | bash -s -- [firefox|chrome|opera|chromium|vivaldi] +$ curl -sSL https://github.com/passff/passff-host/releases/download/${VERSION}/install_host_app.sh | bash -s -- firefox ``` -This script will download the host application (a small python script) and the add-on's manifest file (a JSON config file) and put them in the right place. +Users of other supported browsers need to replace the last argument (`firefox`) by `chrome`, `opera`, `chromium` or `vivaldi`. +The script will download the host application (a small python script) and the add-on's manifest file (a JSON config file) and put them in the right place. If you're concerned about executing a script that downloads files from the web, you can download the files yourself and run the script with the `--local` option instead or link the files yourself. Details below. #### Windows -Download the `install_host_app.bat` script from [our releases page](https://github.com/passff/passff-host/releases) and execute it from within a shell with a correct PATH. +Download the `install_host_app.bat` script from [our releases page](https://github.com/passff/passff-host/releases) and execute it from within a shell with a correct PATH, mentioning your browser in the last argument (i.e., replace `firefox` by `chrome`, `opera`, `chromium` or `vivaldi` if necessary). *The rule of thumb is: if you can execute pass and python from your shell, then your host application will be installed correctly.* ``` -> install_host_app.bat [firefox|chrome|opera|chromium|vivaldi] +> install_host_app.bat firefox ``` Note: Older Windows versions might require powershell to be installed manually as the install script uses powershell internally. Windows 10 users should be fine out of the box. @@ -45,13 +46,13 @@ Note: Older Windows versions might require powershell to be installed manually a #### Latest from GitHub This is not recommended! Only for developers and for testing purposes! -Clone the repository. Then, from the project's `src/` directory, run `make` and execute the installation script in `bin/testing` for your desired browser (`firefox`, `chrome`, `opera`, `chromium`, or `vivaldi`): +Clone the repository. Then, from the project's `src/` directory, run `make` and execute the installation script in `bin/testing` for your desired browser (i.e., replace `firefox` by `chrome`, `opera`, `chromium` or `vivaldi` if necessary): ``` $ cd ./src $ make $ cd ../bin/testing -$ ./install_host_app.sh --local [firefox|chrome|opera|chromium|vivaldi] +$ ./install_host_app.sh --local firefox ``` This will copy the host application and manifest files to the right place for your browser. The `--local` option makes the script use the files on disk rather than downloading them from GitHub. From 682293216618daa0115a795acdc0c3969f3a4926 Mon Sep 17 00:00:00 2001 From: 5bentz <10729484+5bentz@users.noreply.github.com> Date: Sun, 9 Dec 2018 10:12:01 +0100 Subject: [PATCH 4/5] Install script: Add an example in usage(), fix #31 --- src/install_host_app.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/install_host_app.sh b/src/install_host_app.sh index 0300d5f..96aa975 100755 --- a/src/install_host_app.sh +++ b/src/install_host_app.sh @@ -43,6 +43,9 @@ fi usage() { echo "Usage: $0 [OPTION] [chrome|chromium|firefox|opera|vivaldi] + Example: + $0 firefox # Install host app for Mozilla Firefox + Options: -l, --local Install files from disk instead of downloading them -h, --help Show this message" From b8ea131be9d6c57d01cf04ed04a685094e5c130e Mon Sep 17 00:00:00 2001 From: Lucid One Date: Tue, 5 Feb 2019 01:47:41 -0500 Subject: [PATCH 5/5] Host app support for [pass-otp](https://github.com/tadfisher/pass-otp) --- README.md | 6 ++++++ src/passff.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 46de870..9201316 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,12 @@ In the preferences of PassFF, you can enable the status bar and debug logs in th * The typical output for an empty store is: * `{"stderr": "", "version": "1.0.1", "exitCode": 0, "stdout": "Password Store\n"}` +#### Testing OTP support +```console +$ echo -e "\x19\x00\x00\x00[\"otp\",\"/www/github.com\"]" | /path/to/passff.py | tail -c +4; echo +{"exitCode": 0, "stderr": "", "stdout": "123456\n", "version": "1.0.1"} +``` + ### Preferences If you use a customized `pass` installation: environment variables, customized repository path or extensions, you may have to customize the *preferences section* in `passff.py`. diff --git a/src/passff.py b/src/passff.py index 96fd6e2..fffd0ac 100755 --- a/src/passff.py +++ b/src/passff.py @@ -62,6 +62,11 @@ if __name__ == "__main__": pos_args = [receivedMessage[1], receivedMessage[2]] if "-n" in receivedMessage[3:]: opt_args.append("-n") + elif receivedMessage[0] == "otp" and len(receivedMessage) == 2: + opt_args = ["otp"] + key = receivedMessage[1] + key = "/" + (key[1:] if key[0] == "/" else key) + pos_args = [key] else: opt_args = ["show"] key = receivedMessage[0]