Small revision

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/kanako/trunk@17 62e5d677-aa6e-8c4a-b8cb-b9416171cb8e
This commit is contained in:
yakumo.izuru 2023-05-19 00:27:59 +00:00
parent 63c0148498
commit b9bd346535
8 changed files with 42 additions and 28 deletions

8
COPYING Normal file
View File

@ -0,0 +1,8 @@
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42.1):
* <yakumo.izuru@chaotic.ninja> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a bottle of sake in return Izuru Yakumo
* ----------------------------------------------------------------------------
*/

15
DPL-2.3
View File

@ -1,15 +0,0 @@
Discordian Public License 2.3 (DPL-2.3)
All Rites Reversed (ĸ) 3188 Aoi Koizumi [Champagne Supernova] <koizumi.aoi@kyoko-project.wer.ee>
Permission is hereby granted, to any person obtaining a copy of this
material without restriction, including but not limited the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the material, subject to the following conditions:
YOU AGREE THAT THERE IS NO GODDESS BUT GODDESS AND SHE IS YOUR GODDESS &
THAT THERE IS NO ERISIAN MOVEMENT BUT THE ERISIAN MOVEMENT AND IT IS THE
ERISIAN MOVEMENT.
HAIL ERIS!
FIVE TONS OF FLAX

18
Makefile Normal file
View File

@ -0,0 +1,18 @@
include config.mk
install: install-bin install-examples install-man
uninstall: uninstall-bin uninstall-examples uninstall-man
install-bin:
install -Dm${EXEC_MODE} kanako ${PREFIX}/bin/kanako
install-examples:
install -Dm${FILE_MODE} kanako.conf.example ${PREFIX}/share/examples/kanako/kanako.conf
install-man:
install -Dm${FILE_MODE} kanako.mdoc ${PREFIX}/share/man/man1/kanako.1
install -Dm${FILE_MODE} kanako.conf.mdoc ${PREFIX}/share/man/man5/kanako.conf.5
uninstall-bin:
rm -f ${PREFIX}/bin/kanako
uninstall-examples:
rm -f ${PREFIX}/share/examples/kanako/kanako.conf ${PREFIX}/share/exmaples/kanako/kanakomenu.conf
uninstall-man:
rm -f ${PREFIX}/share/man/man1/kanako.1 ${PREFIX}/share/man/man5/kanako.conf.5

View File

@ -1,5 +1,5 @@
# kanako (神奈子) # kanako (神奈子)
the adaptable password manager. named after [Kanako Yasaka](https://en.touhouwiki.net/wiki/Kanako_Yasaka) the adaptable password manager. named after [Kanako Yasaka](https://en.touhouwiki.net/wiki/Kanako_Yasaka) from [Touhou 10: Mountain of Faith](https://en.touhouwiki.net/wiki/Mountain_of_Faith)
## Backends supported ## Backends supported
* [age](https://age-encryption.org) * [age](https://age-encryption.org)
@ -14,21 +14,21 @@ the adaptable password manager. named after [Kanako Yasaka](https://en.touhouwik
## Add-ons ## Add-ons
### kanako_gen ### kanako\_gen
random username and password generator, requires `strings(1)`, random username and password generator, requires `strings(1)`,
`dd(1)` and a sane `tr(1)` (FreeBSD's one behaves differently and `dd(1)` and a sane `tr(1)` (FreeBSD's one behaves differently and
in unexpected ways) in unexpected ways)
### kanako_menu ### kanako\_menu
quick graphical front-end for kanako, works with either of `dmenu(1)` quick graphical front-end for kanako, works with either of `dmenu(1)`
or `bemenu(1)`, useful for copying passwords to clipboard. or `bemenu(1)`, useful for copying passwords to clipboard.
### kanako_totp ### kanako\_totp
time-based one time password addon for kanako, requires `oathtool(1)` time-based one time password addon for kanako, requires `oathtool(1)`
from oath-toolkit. from oath-toolkit.
## License ## License
* [Discordian Public License, version 2.3](https://gt.kalli.st/novaburst/discordian-public-license/src/branch/discordia/DPL-2.3) * [Beerware License (Revision 42.1)](COPYING)
## Related software ## Related software
* [akoizumi/ayu](https://git.shelltalk.net/akoizumi/ayu) [predecessor] * [akoizumi/ayu](https://git.shelltalk.net/akoizumi/ayu) [predecessor]

View File

@ -1,4 +1,5 @@
#!/bin/sh -e #!/bin/sh -e
# $TheSupernovaDuo: kanako_gen,v 1.9 2023/5/18 21:9:33 yakumo_izuru Exp $
fn_genpass() { fn_genpass() {
printf "Password: %s\n" $(strings </dev/urandom | dd bs=1 count=${1:-80} 2>/dev/null | tr -d " \t\n\r") printf "Password: %s\n" $(strings </dev/urandom | dd bs=1 count=${1:-80} 2>/dev/null | tr -d " \t\n\r")

View File

@ -1,6 +1,7 @@
#!/bin/sh -e #!/bin/sh -e
readonly kanako_conf_dir="${conf_dir:-$HOME/.config/kanako}" # $TheSupernovaDuo: kanako,v 1.9 2023/5/18 21:9:33 yakumo_izuru Exp $
readonly kanako_store_dir="${store_dir:-$HOME/.kanako-store}" readonly kanako_conf_dir="${kanako_conf_dir:-$HOME/.config/kanako}"
readonly kanako_store_dir="${kanako_store_dir:-$HOME/.kanako-store}"
if test -f "${kanako_conf_dir}"/kanako.conf; then if test -f "${kanako_conf_dir}"/kanako.conf; then
. "${kanako_conf_dir}"/kanako.conf . "${kanako_conf_dir}"/kanako.conf

View File

@ -1,4 +1,5 @@
#!/bin/sh -e #!/bin/sh -e
# $TheSupernovaDuo: kanako,v 1.9 2023/5/18 21:9:33 yakumo_izuru Exp $
# extracted from https://rgz.ee/bin/pass # extracted from https://rgz.ee/bin/pass
totp_seed="$(kanako -v "$@" | grep 'totp: ' | head -n1 | cut -d' ' -f2)" totp_seed="$(kanako -v "$@" | grep 'totp: ' | head -n1 | cut -d' ' -f2)"

12
kanako
View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $KyokoNet: kanako,v 1.8 2022/11/29 19:59:07 akoizumi Exp $ # $TheSupernovaDuo: kanako,v 1.9 2023/5/18 21:9:33 yakumo_izuru Exp $
readonly kanako_conf_dir="${kanako_conf_dir:-$HOME/.config/kanako}" readonly kanako_conf_dir="${kanako_conf_dir:-$HOME/.config/kanako}"
readonly kanako_key_dir="${kanako_key_dir:-$HOME/.kanako}" readonly kanako_key_dir="${kanako_key_dir:-$HOME/.kanako}"
@ -8,17 +8,17 @@ readonly kanako_store_dir="${kanako_store_dir:-$HOME/.kanako-store}"
if test -d "${kanako_store_dir}"; then if test -d "${kanako_store_dir}"; then
cd "${kanako_store_dir}" cd "${kanako_store_dir}"
else else
echo "Password store not found!" printf "Password store not found!\n"
echo "Create it with mkdir -p $kanako_store_dir" printf "Create it with mkdir -p %s\n" "$kanako_store_dir"
exit 1 exit 1
fi fi
if test -f "${kanako_conf_dir}/kanako.conf"; then if test -f "${kanako_conf_dir}/kanako.conf"; then
. "${kanako_conf_dir}/kanako.conf"; . "${kanako_conf_dir}/kanako.conf";
else else
echo "Configuration file has not been found!" printf "Configuration file has not been found!\n"
echo "Copy kanako.conf from the examples directory," printf "Copy kanako.conf from the examples directory,\n"
echo "and edit accordingly." printf "and edit accordingly.\n"
exit 1 exit 1
fi fi