From 738a794d897cca873068c5d82471c04919f6fe6e Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Sat, 23 May 2026 11:24:11 -0600 Subject: [PATCH] sum silly shitty --- README.md | 3 ++- create-attributable-archive.sh | 21 +++++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2f2c981..dca5d34 100644 --- a/README.md +++ b/README.md @@ -67,4 +67,5 @@ todo - added housekeeping - set perms and ownership on archives and keystore to minimum - shred all erronious files and dirs -- cleaned up code \ No newline at end of file +- cleaned up code +- better rng \ No newline at end of file diff --git a/create-attributable-archive.sh b/create-attributable-archive.sh index 804621c..c0b43d3 100755 --- a/create-attributable-archive.sh +++ b/create-attributable-archive.sh @@ -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 -checkcode $? +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 -checkcode $? + 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