sum silly shitty
This commit is contained in:
@@ -68,3 +68,4 @@ todo
|
|||||||
- set perms and ownership on archives and keystore to minimum
|
- set perms and ownership on archives and keystore to minimum
|
||||||
- shred all erronious files and dirs
|
- shred all erronious files and dirs
|
||||||
- cleaned up code
|
- cleaned up code
|
||||||
|
- better rng
|
||||||
@@ -100,6 +100,9 @@ reset() {
|
|||||||
printf "setting up environment..."
|
printf "setting up environment..."
|
||||||
reset
|
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}..."
|
printf "ssh-keygen: makin new key: ${key_path}..."
|
||||||
ssh-keygen -t ed25519 -f "$key_path" -C "anonymous" -N "" > /dev/null 2>&1
|
ssh-keygen -t ed25519 -f "$key_path" -C "anonymous" -N "" > /dev/null 2>&1
|
||||||
checkcode $?
|
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"
|
echo "anonymous namespaces=\"$signature_tag\" $(cat "${key_path}.pub")" > "$out_dir/anonymous_signer"
|
||||||
checkcode $?
|
checkcode $?
|
||||||
|
|
||||||
printf "random: adding 1/2 random blocks of data to inner archive..."
|
echo "inject random data y/n (default n)"
|
||||||
dd if=/dev/urandom of="$inner_dir/.$RANDOM" bs=1K count=1 > /dev/null 2>&1
|
read random
|
||||||
checkcode $?
|
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..."
|
printf "random: adding 2/2 random blocks of data (1024 bits, 128 bytes) to inner archive..."
|
||||||
dd if=/dev/urandom of="$out_dir/.$RANDOM" bs=1K count=1 > /dev/null 2>&1
|
openssl rand -out "$inner_dir/.$RANDOM" 128 > /dev/null 2>&1
|
||||||
checkcode $?
|
checkcode $?
|
||||||
|
else
|
||||||
|
echo -e 'no random... \e[1;32mOK!\e[0m\n'
|
||||||
|
fi
|
||||||
|
|
||||||
printf "7z: compressing inner volume..."
|
printf "7z: compressing inner volume..."
|
||||||
7z a "$out_dir/contents.7z" "$inner_dir" > /dev/null 2>&1
|
7z a "$out_dir/contents.7z" "$inner_dir" > /dev/null 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user