mirror of
https://codeberg.org/gaschz/passff-host.git
synced 2025-06-06 18:08:46 +02:00
Merge pull request #33 from LucidOne/otp-support
Host app support for OTP
This commit is contained in:
commit
4e74463180
@ -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`.
|
||||
|
||||
|
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user