Created
March 14, 2022 15:35
-
-
Save dangarbri/d29c400d63face4e1ef18721ed334350 to your computer and use it in GitHub Desktop.
Quick lesspass shortcut. Usage `getpass website.com your_username` then enter master password and your password is saved to your clipboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
COUNTER="1" | |
LENGTH="16" | |
from getpass import getpass | |
import lesspass.core as lesspass | |
import sys | |
def main(site, username, extra_args): | |
password = getpass("Enter Password: ") | |
args = ["-c", "-C", COUNTER, "-L", LENGTH, site, username, password] | |
args += extra_args | |
lesspass.main(args) | |
if __name__ == "__main__": | |
extra_args = [] | |
if ("--nos" in sys.argv): | |
extra_args = ["--no-symbols"] | |
main(sys.argv[1], sys.argv[2], extra_args) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment