diff --git a/README.md b/README.md index 255ddf0..a6e7ce5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ the adaptable password manager. named after [Kanako Yasaka](https://en.touhouwik ## Add-ons ### kanako_gen -random username and password generator, requires `busybox(1)` +random username and password generator, requires `strings(1)`, +`dd(1)` and a sane `tr(1)` (FreeBSD's one behaves differently and +in unexpected ways) ### kanako_menu quick graphical front-end for kanako, works with either of `dmenu(1)` @@ -30,6 +32,7 @@ from oath-toolkit. ## Related software * [akoizumi/ayu](https://git.shelltalk.net/akoizumi/ayu) [predecessor] +* [beastie/aps](https://codeberg.org/beastie/aps) * [biox/pa](https://github.com/biox/pa) * [e-zk/page](https://github.com/e-zk/page) * [kl3/spm](https://notabug.org/kl3/spm) diff --git a/addons/kanako_gen b/addons/kanako_gen index e5e73f2..970626c 100755 --- a/addons/kanako_gen +++ b/addons/kanako_gen @@ -1,10 +1,10 @@ #!/bin/sh -e fn_genpass() { - printf "Password: %s\n" $(busybox tr -dc '[A-Z][a-z][0-9]' /dev/null; echo) + printf "Password: %s\n" $(strings /dev/null | tr -d " \t\n\r") } fn_genuser() { - printf "Username: %s\n" $(busybox tr -dc '[A-Z][a-z][0-9]' /dev/null; echo) + printf "Username: %s\n" $(strings /dev/null | tr -d " \t\n\r") } case $1 in diff --git a/addons/kanako_menu b/addons/kanako_menu index 20be3c5..e747e93 100755 --- a/addons/kanako_menu +++ b/addons/kanako_menu @@ -9,4 +9,4 @@ else exit 1 fi -find . -name '*.enc' | sort | sed 's,^\./,,;s,\.enc$,,' | ${menu_prog} | xargs $(which kanako) -c +find . -name '*.enc' | sort | sed 's,^\./,,;s,\.enc$,,' | "${kanako_menu_cmd}" | xargs $(which kanako) -c diff --git a/kanako b/kanako index 6940bf8..1bc6fc0 100755 --- a/kanako +++ b/kanako @@ -45,7 +45,7 @@ fn_new() { rm ${tmpfile} } fn_trash_directory() { - rm -rf "$@" + rm -rf "$1" } fn_trash_file() { rm -f "${1}${2}".enc diff --git a/kanako.conf.example b/kanako.conf.example index 75e8897..5b99a0c 100644 --- a/kanako.conf.example +++ b/kanako.conf.example @@ -3,6 +3,7 @@ #kanako_clip_cmd="xclip -i" #kanako_clip_cmd="wl-copy --primary" #kanako_list_cmd="tree" +#kanako_menu_cmd="dmenu" ## age #kanako_encrypt_cmd="age" diff --git a/kanako.conf.mdoc b/kanako.conf.mdoc index 08ef9d4..126dbaf 100644 --- a/kanako.conf.mdoc +++ b/kanako.conf.mdoc @@ -1,36 +1,30 @@ -.Dd Bureaucracy 73, 3188 +.Dd Aftermath 41, 3188 .Dt KANAKO.CONF 5 .Os .Sh NAME .Nm kanako.conf .Nd configuration file for .Xr kanako 1 -.Sh KEYS -.Ss General section +.Sh FIELDS .Bl -tag -width 11n -compact -.It clip_cmd -Clipboard manager command -.It debug -Controls whether to use debug -mode or not. Any value other -than false is interpreted as -true. -.It list_cmd -Command used to print a listing -of the password store -.It menu_cmd -Menu command for kanako_menu -.El -.Ss Encryption section -.Bl -tag -width 11n -compact -.It encrypt_cmd -Command to handle encryption -.It encrypt_args -Options to be passed to -encrypt_cmd for encryption -.It decrypt_args -Options to be passed to -encrypt_cmd for decryption +.It kanako_clip_cmd +Clipboard executable to be +used with the -c switch +.It kanako_decrypt_args +Arguments for decryption +passed to kanako_encrypt_cmd +.It kanako_encrypt_args +Arguments for encryption +passed to kanako_encrypt_cmd +.It kanako_encrypt_cmd +Encryption executable to +be used with the program +.It kanako_list_cmd +Listing executable to +be used with the -l switch +.It kanako_menu_cmd +Menu executable to +be used with kanako_menu .El .Sh SEE ALSO .Xr kanako 1 diff --git a/kanako.mdoc b/kanako.mdoc index 0c052a5..ab73738 100644 --- a/kanako.mdoc +++ b/kanako.mdoc @@ -6,25 +6,13 @@ .Nd the adaptable password manager .Sh SYNOPSIS .Nm -.Fl c -.Ar args -.Nm -.Fl e -.Ar args -.Nm +.Fl c Ar args +.Fl e Ar args .Fl l -.Nm -.Fl n -.Ar args -.Nm -.Fl r -.Ar args -.Nm -.Fl R -.Ar args -.Nm -.Fl v -.Ar args +.Fl n Ar args +.Fl r Ar args +.Fl R Ar args +.Fl v Ar args .Sh DESCRIPTION It is a clean rewrite of .Xr ayu 1