You should edit all variables and filenames :)
==> backup_homes.bash <==
set -e
RECIPIENT_KEY=github://aerth
FILENAME="/tmp/backup_$(date +%s).dat"
DIR_TO_BACKUP=/home/
# pipe tar into age and then echo the filename when finished
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mDMEZ5c/ExYJKwYBBAHaRw8BAQdApMUnGOV7cLLrNgHzcFjLTc6LAttPbHucD1rJ | |
kyEDbRu0GGFlcnRoIDxhZXJ0aEByaXNldXAubmV0PoiQBBMWCAA4FiEEnX8CtMQY | |
S5hpji8e0KUhqbevpdIFAmeXRqICGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA | |
CgkQ0KUhqbevpdL5AgD+MbycLgwTCKvIZV2RBicx8Hmtt5HuuUNRv0T/rq+6eHgB | |
AL04NhINKvC86Fq0vEYWWJq8RsgPHUQkGJpadewP/pcFtBdhZXJ0aCA8YWVydGhA | |
bG9jYWxob3N0PoiQBBMWCAA4FiEEnX8CtMQYS5hpji8e0KUhqbevpdIFAmeXPxMC | |
GwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQ0KUhqbevpdKPAAD8DcXFr0KN | |
uyf+DCklAQw0HLfJGagDpJzQOyxka+HYQvsBANih2NurDbwXDMBbAjqcd0461Sp6 |
#!/bin/bash | |
if [ ! "$USER" = "root" ]; then | |
echo must run as root | |
exit 111 | |
fi | |
if [ ! -f *.info ]; then | |
echo '*.info not found' | |
exit 112 |
You should edit all variables and filenames :)
==> backup_homes.bash <==
set -e
RECIPIENT_KEY=github://aerth
FILENAME="/tmp/backup_$(date +%s).dat"
DIR_TO_BACKUP=/home/
# pipe tar into age and then echo the filename when finished
var printf = fmt.Printf | |
var fprintf = fmt.Fprintf | |
var newerr = fmt.Errorf |
AQUA: 0x81C6F3459CF418D4B92aDfEE41D5b2AB545316fa | |
ETH: 0x81C6F3459CF418D4B92aDfEE41D5b2AB545316fa | |
BTC: bc1qyushnctq89wh90yrmnw8h4tqh6mpf9l38qr0mq | |
XMR: 4AQMNXhM2FG1aSNetWFcBhLRBt15HHxV2ByQseoHMgBJXZcwj5jE5MDXjyYd8KE6aH9v3eQK2mG1AUyTFgvRTbWg4UEB2NP | |
LTC: MQv3dHtgagM9wYBE7mSXDTw5AGTMmuSsCa |
set disable-randomization off | |
set $_exitcode = -999 | |
set height 0 | |
handle SIGTERM nostop print pass | |
handle SIGPIPE nostop | |
define hook-stop | |
if $_exitcode != -999 | |
quit | |
else | |
shell echo | mail -s "NOTICE: app has stopped on unhandled signal" root |
curl https://keybase.io/aerth/key.asc | gpg --import | |
echo "hello world" >> yourmessage.txt | |
cat yourmessage.txt | gpg -er [email protected] > yourmessage.txt.out | |
# see this | |
gpg: 3C66B4C6: There is no assurance this key belongs to the named user | |
pub 4096R/3C66B4C6 2016-05-02 aerth <[email protected]> | |
Primary key fingerprint: 8295 3CFA 6F4F 49D0 2B6A 082F EBC4 61F6 8638 5D5C | |
Subkey fingerprint: C08F EA77 F70C 5B37 2D8C 12EF F76A 0E59 3C66 B4C6 |
package cryptopal | |
import ( | |
"encoding/base64" | |
"encoding/hex" | |
"testing" | |
) | |
var input = "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d" |
adb into android, grab /data/data/com.fsck.k9/databases/preferences_storage | |
this is easier with sqlitebrowser | |
i had to remove some chars off the beginning of each string, | |
STRINGS=$(strings preferences_storage | grep "==") | |
for i in $STRINGS; do | |
echo $i | base64 -d | |
done |