mirror of
https://codeberg.org/gaschz/passff-host.git
synced 2025-06-06 18:08:46 +02:00
Merge branch 'master' into makefile-fixes
This commit is contained in:
commit
0159523c30
18
README.md
18
README.md
@ -22,21 +22,23 @@ This piece of software wraps around the **[zx2c4 pass](http://www.zx2c4.com/proj
|
|||||||
|
|
||||||
#### Linux, MacOS, * BSD
|
#### 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.
|
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
|
#### 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.*
|
*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.
|
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:
|
* The typical output for an empty store is:
|
||||||
* `{"stderr": "", "version": "1.0.1", "exitCode": 0, "stdout": "Password Store\n"}`
|
* `{"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
|
### 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`.
|
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`.
|
||||||
|
|
||||||
|
@ -43,6 +43,9 @@ fi
|
|||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [OPTION] [chrome|chromium|firefox|opera|vivaldi]
|
echo "Usage: $0 [OPTION] [chrome|chromium|firefox|opera|vivaldi]
|
||||||
|
|
||||||
|
Example:
|
||||||
|
$0 firefox # Install host app for Mozilla Firefox
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-l, --local Install files from disk instead of downloading them
|
-l, --local Install files from disk instead of downloading them
|
||||||
-h, --help Show this message"
|
-h, --help Show this message"
|
||||||
|
@ -52,17 +52,23 @@ if __name__ == "__main__":
|
|||||||
std_input = None
|
std_input = None
|
||||||
|
|
||||||
if len(receivedMessage) == 0:
|
if len(receivedMessage) == 0:
|
||||||
pass
|
opt_args = ["show"]
|
||||||
elif receivedMessage[0] == "insert":
|
elif receivedMessage[0] == "insert":
|
||||||
opt_args = ["insert", "-m"]
|
opt_args = ["insert", "-m"]
|
||||||
pos_args = [receivedMessage[1]]
|
pos_args = [receivedMessage[1]]
|
||||||
std_input = receivedMessage[2]
|
std_input = receivedMessage[2]
|
||||||
elif receivedMessage[0] == "generate":
|
elif receivedMessage[0] == "generate":
|
||||||
pos_args = [receivedMessage[1], receivedMessage[2]]
|
|
||||||
opt_args = ["generate"]
|
opt_args = ["generate"]
|
||||||
|
pos_args = [receivedMessage[1], receivedMessage[2]]
|
||||||
if "-n" in receivedMessage[3:]:
|
if "-n" in receivedMessage[3:]:
|
||||||
opt_args.append("-n")
|
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:
|
else:
|
||||||
|
opt_args = ["show"]
|
||||||
key = receivedMessage[0]
|
key = receivedMessage[0]
|
||||||
key = "/" + (key[1:] if key[0] == "/" else key)
|
key = "/" + (key[1:] if key[0] == "/" else key)
|
||||||
pos_args = [key]
|
pos_args = [key]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user