mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-28 18:28:35 -05:00
9b81f9b07b
- neovim: + update lspkind icons for completion + start migrating config for nvim-tree.lua + update lsp config for sumneko_lua - scripts: + add POSIX clients for PurritoBin (https://bsd.ac) + add script to upload to https://0x0.st
17 lines
489 B
Bash
Executable File
17 lines
489 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# POSIX shell client for PurritoBin to upload encrypted message
|
|
|
|
: "${P_SERVER=https://bsd.ac}"
|
|
: "${P_PORT=42069}"
|
|
: "${P_MAXTIME=30}"
|
|
|
|
# generate a 256 byte random key
|
|
# for using the aes-256-cbc cipher
|
|
key="$(openssl rand -hex 32)"
|
|
iv="$(openssl rand -hex 16)"
|
|
# calculate its encryption and upload it
|
|
url="$(openssl enc -aes-256-cbc -K ${key} -iv ${iv} -e -base64 -A < ${1:-/dev/stdin} | purr)"
|
|
printf %s\\n "${url%\/*}/paste.html#${url##*\/}_${key}_${iv}"
|
|
unset key iv url
|