Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Add keepass-like autotype #3

Open
UltraBlackLinux opened this issue Sep 26, 2022 · 7 comments
Open

Add keepass-like autotype #3

UltraBlackLinux opened this issue Sep 26, 2022 · 7 comments

Comments

@UltraBlackLinux
Copy link

Hey there,
I really like this project, but It's proven to be pretty tedious to open wofi, search the entry and select the value of a stored login. I would love to see an autotype feature so I only have to select an entry and it automatically reads an autotype field to enter the credentials.
I would prefer to have a keepass-like autotype - I think enter, tab, delay and a field are be the most important values for such a feature.
Thanks!

@TinfoilSubmarine
Copy link
Owner

Hi, thanks for the suggestion. I've thought about implementing such a feature, but always lost motivation because the default autotype (wofi-pass --autotype) met >90% of the scenarios where I wanted to autotype. Have you had a chance to try this? What are the shortcomings?

@UltraBlackLinux
Copy link
Author

UltraBlackLinux commented Sep 26, 2022

Hi, thanks for the suggestion. I've thought about implementing such a feature, but always lost motivation because the default autotype (wofi-pass --autotype) met >90% of the scenarios where I wanted to autotype. Have you had a chance to try this? What are the shortcomings?

I did try this, but never ended up using it, because it apparently expects a "password: " field, but the first line is always already the password. If I added "password:" then it would mess up other pass utilities since they will always also read that prefix. Meaning that it would always just error on line 103 and exit.

I would like to see the following just because it will cause the least problems:

myexamplepassword
username: this has any prefix
somevalue: foobarbazcruz
otpauth://somestuff
autotype: {password}{TAB}{username}{DELAY 1000}{OTP}{TAB}{somevalue}{ENTER}

What do you think? It handles cases like gitea equally as well as Paypal (which is hiding the password prompt on another page which it redirects to after a few seconds)

@TinfoilSubmarine
Copy link
Owner

I did try this, but never ended up using it, because it apparently expects a "password: " field, but the first line is always already the password. If I added "password:" then it would mess up other pass utilities since they will always also read that prefix. Meaning that it would always just error on line 103 and exit.

Hmm, this sounds like a bug. Are you using the latest version? I just pushed a commit that fixed a possibly related issue. And it does not expect a password: field, it should be using the same scheme you are using (password at top).

@TinfoilSubmarine
Copy link
Owner

I would like to see the following just because it will cause the least problems:

myexamplepassword
username: this has any prefix
somevalue: foobarbazcruz
otpauth://somestuff
autotype: {password}{TAB}{username}{DELAY 1000}{OTP}{TAB}{somevalue}{ENTER}

What do you think? It handles cases like gitea equally as well as Paypal (which is hiding the password prompt on another page which it redirects to after a few seconds)

I like this idea, I'll look into how hard it would be to implement. A quality pull request would also be welcome; after all, Hacktoberfest is coming up... :)

@UltraBlackLinux
Copy link
Author

I like this idea, I'll look into how hard it would be to implement. A quality pull request would also be welcome; after all, Hacktoberfest is coming up... :)

I would love to do this in lua, if you accept the inclusion of lua stuff into your project. it would make things much much easier ;)

@TinfoilSubmarine
Copy link
Owner

Hey, sorry for just getting around to responding to this, your other issue reminded me. I haven't been using this project for a little while now, but I would be OK with anything you are willing to contribute.

@UltraBlackLinux
Copy link
Author

UltraBlackLinux commented Oct 26, 2022

parse.lua.txt

This is my current version of the parser. I suggest you just use this as inspiration for a reimplementation in bash. I'm just not really familiar with that.
Some features are also not fully complete, as seen in the comments. I had no clue how to use pass-otp with a supplied link, so I just left that out for you to add once you implement this (hopefully)

I hope this is at least somewhat useful to you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants