Initial payload

Signed-off-by: Aoi K <koizumi.aoi@kyoko-project.wer.ee>

git-svn-id: file:///srv/svn/repo/kanako/trunk@1 62e5d677-aa6e-8c4a-b8cb-b9416171cb8e
This commit is contained in:
koizumi.aoi 2022-10-09 02:26:55 +00:00
commit d55cab46a7
5 changed files with 165 additions and 0 deletions

15
DPL-2.3 Normal file
View File

@ -0,0 +1,15 @@
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

23
README.md Normal file
View File

@ -0,0 +1,23 @@
# ayu-ng
Rewrite of `ayu(1)`, an actually boring password manager, now with interchangeable encryption backend.
## Backends supported
* [age](https://age-encryption.org)
* [gpg](https://gnupg.org)
* [saltpack (via salty)](https://git.mills.io/prologic/salty)
## Dependencies
* Any of the above, depending how you configured it
* `ls(1)` or `tree(1)` for printing a list
* `mandoc(1)` for documentation
## License
* [Discordian Public License, version 2.3](https://gt.kalli.st/novaburst/discordian-public-license/src/branch/discordia/DPL-2.3)
## Related software
* [biox/pa](https://github.com/biox/pa)
* [e-zk/page](https://github.com/e-zk/page)
* [kl3/spm](https://notabug.org/kl3/spm)
* [nmeum/tpm](https://github.com/nmeum/tpm)
* [shokara/angou](https://gt.kalli.st/shokara/angou)
* [zx2c4/pass](https://passwordstore.org)

66
ayu-ng Executable file
View File

@ -0,0 +1,66 @@
#!/bin/sh -e
conf_dir=${conf_dir:-$HOME/.config/ayu}
key_dir=${key_dir:-$HOME/.ayu}
store_dir=${store_dir:-$HOME/.ayu-store}
cd ${store_dir} || exit 1
. ${conf_dir}/config
fn_copy() {
fn_view $2 | ${clip}
}
fn_edit() {
${decrypt_cmd} ${decrypt_args} ${1%%.enc}.enc
${EDITOR} ${1%%.enc}
${encrypt_cmd} ${encrypt_args} ${1%%.enc}
rm ${1%%.enc}
}
fn_generate() {
pwgen -s ${2:-80}
}
fn_list() {
if command -v tree 2>/dev/null; then
tree ${store_dir}
else
ls -l ${store_dir}
fi
}
fn_new() {
test -d $1 && fn_usage && exit 1
tmpfile=$(mktemp)
${EDITOR} ${tmpfile}
mkdir -p $(dirname $1)
${encrypt_cmd} ${encrypt_args} ${tmpfile}
mv ${tmpfile}.enc ${1%%.enc}.enc
rm ${tmpfile}
}
fn_trash_directory() {
rm -rf $@
}
fn_trash_entry() {
rm -f ${1}${2},enc
}
fn_usage() {
cat <<EOF
Usage:
ayu [-ceglnrRv] <arguments>
ayu [copy|edit|generate|list|add|trash|trashdir|view] <arguments>
EOF
}
case $1 in
-c | copy) fn_copy $2 ;;
-e | edit) fn_edit $2 ;;
-g | generate) fn_generate $2 ;;
-l | list) fn_list ;;
-n | add) fn_new ;;
-r | trash) fn_trash $2 ;;
-R | trashd) fn_trash_directory $2 ;;
-v | view) fn_view $2 ;;
*) fn_usage ;;
esac

18
ayu-ng.conf.example Normal file
View File

@ -0,0 +1,18 @@
# [General]
#clip="xclip -i"
# [Encryption]
## age
#encrypt_cmd="age"
#encrypt_args="-e -R ${key_dir}/pub.age"
#decrypt_args="-d -i ${key_dir}/priv.age"
## gpg
#encrypt_cmd="gpg"
#encrypt_args="-e --recipient ${key_dir}/pub.gpg"
#decrypt_args="-d"
## salty
#encrypt_cmd="salty"
#encrypt_args="-e -r $(cat ${key_dir}/pub.slt)"
#decrypt_args="-d -i ${key_dir}/priv.slt"

43
ayu-ng.mdoc Normal file
View File

@ -0,0 +1,43 @@
.Dd Bureaucracy 62, 3188
.Dt AYU-NG 1
.Os
.Sh NAME
.Nm ayu-ng
.Nd rewrite of ayu, an actually boring password manager
.Sh DESCRIPTION
.Sh USAGE
.Bl -tag -width 11n -compact
.It add, -n
Add a new entry
.It copy, -c
Copy an entry's text to the clipboard
.It edit, -e
Edit an entry
.It generate, -g
Generate a random password
.It list, -l
List all entries
.It del, -r
Remove single entries
.It delr, -R
Remove recursively a directory w/ entries
.It view, -v
View an entry
.Bl
.El
.Sh SEE ALSO
.Xr 5 ayu-ng.conf
.Rs
.%A Rob Pike
.%T "UNIX Style, or cat -v Considered Harmful"
.%J "USENIX Summer Conference Proceedings"
.%D 1983
.Re
.Sh AUTHORS
.An Aoi Koizumi Aq Mt koizumi.aoi@kyoko-project.wer.ee
.Sh BUGS
Under the Wayland display protocol,
the clipboard subcommand won't work,
due to 'Permission denied'. On X11
it works just fine.