Merge branch 'master' into makefile-fixes

This commit is contained in:
Thomas Vogt 2019-02-07 12:19:52 +01:00 committed by GitHub
commit 0159523c30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 7 deletions

View File

@ -22,21 +22,23 @@ 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. As an example, Firefox users 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
```
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.
@ -143,6 +145,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`.

View File

@ -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"

View File

@ -52,17 +52,23 @@ 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")
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]
key = "/" + (key[1:] if key[0] == "/" else key)
pos_args = [key]