sum silly shitty
This commit is contained in:
@@ -68,3 +68,4 @@ todo
|
||||
- set perms and ownership on archives and keystore to minimum
|
||||
- shred all erronious files and dirs
|
||||
- cleaned up code
|
||||
- better rng
|
||||
@@ -100,6 +100,9 @@ reset() {
|
||||
printf "setting up environment..."
|
||||
reset
|
||||
|
||||
# wait for keypress
|
||||
read -n 1 -s -r -p "In another terminal/window, fill $inner_dir with whatever you please then press any key to continue..."
|
||||
|
||||
printf "ssh-keygen: makin new key: ${key_path}..."
|
||||
ssh-keygen -t ed25519 -f "$key_path" -C "anonymous" -N "" > /dev/null 2>&1
|
||||
checkcode $?
|
||||
@@ -116,13 +119,19 @@ printf "ssh-keygen: creating $out_dir/anonymous_signer..."
|
||||
echo "anonymous namespaces=\"$signature_tag\" $(cat "${key_path}.pub")" > "$out_dir/anonymous_signer"
|
||||
checkcode $?
|
||||
|
||||
printf "random: adding 1/2 random blocks of data to inner archive..."
|
||||
dd if=/dev/urandom of="$inner_dir/.$RANDOM" bs=1K count=1 > /dev/null 2>&1
|
||||
echo "inject random data y/n (default n)"
|
||||
read random
|
||||
if [[ "$random" == "" || "$random" =~ ^[nN]{1}$ ]]; then
|
||||
printf "random: adding 1/2 random blocks of data (1024 bits, 128 bytes) to outer archive..."
|
||||
openssl rand -out "$out_dir/.$RANDOM" 128 > /dev/null 2>&1
|
||||
checkcode $?
|
||||
|
||||
printf "random: adding 2/3 random blocks of data to outer archive..."
|
||||
dd if=/dev/urandom of="$out_dir/.$RANDOM" bs=1K count=1 > /dev/null 2>&1
|
||||
printf "random: adding 2/2 random blocks of data (1024 bits, 128 bytes) to inner archive..."
|
||||
openssl rand -out "$inner_dir/.$RANDOM" 128 > /dev/null 2>&1
|
||||
checkcode $?
|
||||
else
|
||||
echo -e 'no random... \e[1;32mOK!\e[0m\n'
|
||||
fi
|
||||
|
||||
printf "7z: compressing inner volume..."
|
||||
7z a "$out_dir/contents.7z" "$inner_dir" > /dev/null 2>&1
|
||||
|
||||
Reference in New Issue
Block a user