Compare commits

...

9 Commits

Author SHA1 Message Date
PrincessPi e06274cb26 mayhappenz 2026-06-13 16:19:42 -06:00
PrincessPi 7a5d10ad45 mayhappenz 2026-06-13 15:32:25 -06:00
PrincessPi b9ce826c3c fix 2026-06-13 15:25:44 -06:00
PrincessPi b5d5b77149 fix 2026-06-13 15:20:52 -06:00
PrincessPi 255529e196 fix 2026-06-13 15:09:45 -06:00
PrincessPi 34fc3f4f9c fix 2026-06-13 13:24:11 -06:00
PrincessPi 584d4e9075 1781378198 2026-06-13 13:16:37 -06:00
PrincessPi 55c6df5273 1781375450 2026-06-13 12:30:50 -06:00
PrincessPi 82426bb3f2 1781374782 2026-06-13 12:19:41 -06:00
6 changed files with 20 additions and 108 deletions
+3 -1
View File
@@ -16,6 +16,8 @@ out/content/*
*/*.7z */*.7z
*/*.sha512 */*.sha512
*/*.sha256 */*.sha256
*/private_* */.private_*
*.attribution_*
*/*.sig */*.sig
*/checksums.txt
anonymous_signer anonymous_signer
-16
View File
@@ -1,16 +0,0 @@
e1351c891f5d836961f9a5bf8272b12e ./.gitignore
b73f788fe14ae5b781d81eb94e960de0 ./archives/README.md
11e5d6a30bfd73314e40a34b8189e647 ./checksums_generate_recursive.sh
b381bf88afe4262ad8185dd64a0d842d ./create-attributable-archive.sh
7bb49a9ca83d3eaec2ff3a16e3e35981 ./datetimestamp.txt
0a007706580563c1d3f31b37b28be8bc ./FileMap.md
c7a749b080c6dd2324568f0bd5c0f17f ./keystore/README.md
dd2587cac4bdd1b2231e7805eb48df90 ./out/contents/README.md
298db900c3611a0f6794ee30eacbf23d ./out/README.md
973323f463d79c6870a8448c62c83a81 ./out/test_validate_passphrase.sh
a4bc6a7243371e94b7d831433cb43afa ./out/verify-everything.sh
ba1192e212e20c3c1b3306a4faef6b8a ./README-instructions.txt
bc6cd9956d0fa7fe8c8d242e02330531 ./README.md
43f978564c0309905204c2e3d41920c4 ./Specification.md
973323f463d79c6870a8448c62c83a81 ./test_validate_passphrase.txt
a4bc6a7243371e94b7d831433cb43afa ./verify-everything.txt
-31
View File
@@ -1,31 +0,0 @@
8eaf8cd5d9e5cb3d2170a44344a8efc37e014ad8d7d8cc4fa49fb4a6e2a18bbe ./.gitignore
7fd36c34bee48c3fae99ed4bf3ab4dcbc53b20405e20fec7261e2b53e78ae6b2 ./archives/README.md
e4fe64ba4374d0ccdb5b35c09b92bc3914f7c54b95e0a5b64b3fb903b80dc931 ./checksums_generate_recursive.sh
4b4a63a30c7ef05f876d9d82cb814eb6a47ab2c494a7894c4066216f0b6b0c07 ./create-attributable-archive.sh
77a0b49395192e3b4ab451bf3512e3d5bd317f09ad826a65d2e8d2028456e2f0 ./FileMap.md
4393dfc3184bb3ce55bf4c611b5aabaebc551da4cf748570a01e9f7a3a79b837 ./keystore/README.md
8d09ddfa82784ae6b88962d72712b10d9c555de791034c44ba7a5e5a7630a0f4 ./out/contents/README.md
6f0b8bd158eb8608beca242d60257765c5ec0fa97e0a2a67c16482c8c9ee33ec ./out/README.md
5e795860b295d132e2382c137b1a61211e4e315cb064a40a41dccaa4692f64fb ./out/test_validate_passphrase.sh
af78d32024215da3f69c817440855e7c34e4d05d4ba17ccacc0162a56127cfd0 ./out/verify-everything.sh
2c873d9dd7fabc18b139d18c094ed16b5c3107448ce92c812e05474e8e1f5652 ./README-instructions.txt
327a649a4851981e8d4dcdd473a577210b1cd7c6e078789c821d2c29fee20e0d ./README.md
065d7229fbf08a2b6e0098435fa12221398e4386026f6bebd3ac5b756f73616d ./Specification.md
5e795860b295d132e2382c137b1a61211e4e315cb064a40a41dccaa4692f64fb ./test_validate_passphrase.txt
af78d32024215da3f69c817440855e7c34e4d05d4ba17ccacc0162a56127cfd0 ./verify-everything.txt
8eaf8cd5d9e5cb3d2170a44344a8efc37e014ad8d7d8cc4fa49fb4a6e2a18bbe ./.gitignore
7fd36c34bee48c3fae99ed4bf3ab4dcbc53b20405e20fec7261e2b53e78ae6b2 ./archives/README.md
e4fe64ba4374d0ccdb5b35c09b92bc3914f7c54b95e0a5b64b3fb903b80dc931 ./checksums_generate_recursive.sh
4b4a63a30c7ef05f876d9d82cb814eb6a47ab2c494a7894c4066216f0b6b0c07 ./create-attributable-archive.sh
45da0a27c033830a13f0a195ad8729379fe82fd0cf30a938a379055630c4677b ./datetimestamp.txt
77a0b49395192e3b4ab451bf3512e3d5bd317f09ad826a65d2e8d2028456e2f0 ./FileMap.md
4393dfc3184bb3ce55bf4c611b5aabaebc551da4cf748570a01e9f7a3a79b837 ./keystore/README.md
8d09ddfa82784ae6b88962d72712b10d9c555de791034c44ba7a5e5a7630a0f4 ./out/contents/README.md
6f0b8bd158eb8608beca242d60257765c5ec0fa97e0a2a67c16482c8c9ee33ec ./out/README.md
5e795860b295d132e2382c137b1a61211e4e315cb064a40a41dccaa4692f64fb ./out/test_validate_passphrase.sh
af78d32024215da3f69c817440855e7c34e4d05d4ba17ccacc0162a56127cfd0 ./out/verify-everything.sh
2c873d9dd7fabc18b139d18c094ed16b5c3107448ce92c812e05474e8e1f5652 ./README-instructions.txt
327a649a4851981e8d4dcdd473a577210b1cd7c6e078789c821d2c29fee20e0d ./README.md
065d7229fbf08a2b6e0098435fa12221398e4386026f6bebd3ac5b756f73616d ./Specification.md
5e795860b295d132e2382c137b1a61211e4e315cb064a40a41dccaa4692f64fb ./test_validate_passphrase.txt
af78d32024215da3f69c817440855e7c34e4d05d4ba17ccacc0162a56127cfd0 ./verify-everything.txt
-40
View File
@@ -1,40 +0,0 @@
#!/bin/bash
# file paths
sha256_file_path=./checksums.sha256
md5_file_path=./checksums.md5
error_log=./checksums_error.log
# text colors
RED='\e[31m'
YELLOW='\033['
GREEN='\e[32m'
RESET='\e[0m'
# output errors to error log
exec 2> >(tee -a "$error_log" >&2)
if [ -f "sha256_file_path" ]; then
echo -e "${YELLOW}Warn${RESET}: Existing $sha256_file_path Found, Deleting..."
rm -f "sha256_file_path"
fi
if [ -f "$md5_file_path" ]; then
echo -e "${YELLOW}Warn${RESET}: Existing $md5_file_path Found, Deleting..."
rm -f "$md5_file_path"
fi
if [ -f "$error_log" ]; then
echo -e "${YELLOW}Warn${RESET}: Existing $error_log Found, Deleting..."
rm -f "$error_log"
fi
# notify user
echo "Calculating SHA256 and MD5 Checksums Recursively into $sha256_file_path and $md5_file_path\n\t${YELLOW}This May Take a Long Time!${RESET}"
# exclude git
if find . -type f ! -path "*/.git/*" ! -path "$error_log" ! -path "$md5_file_path" ! -path "$sha256_file_path" -exec bash -c "file_path={} && sha256sum \$file_path 1>> $sha256_file_path && md5sum \$file_path 1>> $md5_file_path" \;; then
echo -e "\n${GREEN}SUCCESS!${RESET} Generated SHA256 and MD5 Checksums into $sha256sum and $md5_file_path Respectively!\n"
exit 0 # explicitly exit success
else
echo -e "\n${RED}FAIL!${RESET} Failed to Generate SHA256 and MD5 Checksums! Check Error Output or Check Error Log: $error_log\n" >&2
exit 1 # explicitly fail
fi
+17 -20
View File
@@ -1,13 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# packages: 7zip, shred, secure-delete, cracklib-runtime, openssl, curl
set -o errtrace set -o errtrace
set -o nounset set -o nounset
set -o pipefail set -o pipefail
IFS=$'\n\t'
IFS=$'\n\t'
unix_seconds=$(date +%s) unix_seconds=$(date +%s)
key_path="./private_ed25519_${unix_seconds}" key_path=".private_ed25519_${unix_seconds}"
attribution_keystore=".attribution_passphrase_${unix_seconds}"
signature_tag="file-integrity" signature_tag="file-integrity"
out_dir="./out" out_dir="./out"
inner_dir="$out_dir/contents" inner_dir="$out_dir/contents"
@@ -55,7 +54,7 @@ run_cmd() {
reset() { reset() {
printf 'Autoshredding known artifacts...\n' printf 'Autoshredding known artifacts...\n'
find . -maxdepth 1 -type f \( -name 'private_*' -o -name 'attribution_passphrase_*' -o -name '*.sha512' -o -name 'checksums*' -o -name '*.sig' -o -name '*.7z' -o -name 'anonymous_signer' \) -exec shred -uz {} + find . -maxdepth 1 -type f \( -name '.private_*' -o -name '.attribution_passphrase_*' -o -name '*.sha512' -o -name 'checksums*' -o -name '*.sig' -o -name '*.7z' -o -name 'anonymous_signer' \) -exec shred -uz {} +
checkcode $? checkcode $?
if compgen -G 'private_*' >/dev/null 2>&1; then if compgen -G 'private_*' >/dev/null 2>&1; then
@@ -100,7 +99,7 @@ reset() {
checkcode $? checkcode $?
find "$dir" -mindepth 1 -type d -exec srm -r -z -l '{}' + >/dev/null 2>&1 || true find "$dir" -mindepth 1 -type d -exec srm -r -z -l '{}' + >/dev/null 2>&1 || true
find "$dir" -type f \( -name 'private_ed25519_*' -o -name 'attribution_passphrase_*' \) -exec shred -uz '{}' + >/dev/null 2>&1 || true find "$dir" -type f \( -name '.private_*' -o -name '.attribution_*' \) -exec shred -uz '{}' + >/dev/null 2>&1 || true
find "$dir" -type f -exec chmod 600 '{}' + find "$dir" -type f -exec chmod 600 '{}' +
checkcode $? checkcode $?
fi fi
@@ -209,17 +208,11 @@ exit_cleanup() {
printf "cleaning up on exit" printf "cleaning up on exit"
reset > /dev/null 2>&1 reset > /dev/null 2>&1
checkcode $? checkcode $?
# todo: uset vars
} }
trap error_handle ERR trap error_handle ERR
trap exit_cleanup EXIT trap exit_cleanup EXIT
# ret=`audit_passphrase 'yw0EKY6wbSxU6KJxWN3vFZDgnSjJ4F8wqFrAJMcDxfU' 'yw0EKY6wbSxU6KJxWN3vFZDgnSjJ4F8wqFrAJMcDxfU'`
# echo $ret
# exit 0
require_dependencies require_dependencies
printf 'Setting up environment...\n' printf 'Setting up environment...\n'
reset reset
@@ -229,7 +222,7 @@ read -n 1 -s -r -p "In another terminal/window, fill $inner_dir with whatever yo
printf '\n' printf '\n'
printf 'ssh-keygen: creating new key: %s...\n' "$key_path" printf 'ssh-keygen: creating new key: %s...\n' "$key_path"
ssh-keygen -t ed25519 -f "$key_path" -C 'anonymous' -N '' >/dev/null 2>&1 ssh-keygen -t ed25519 -C 'anonymous' -N '' -f "$key_path" >/dev/null 2>&1
checkcode $? checkcode $?
printf 'ssh-keygen: fixing permissions on %s and %s...\n' "$key_path" "${key_path}.pub" printf 'ssh-keygen: fixing permissions on %s and %s...\n' "$key_path" "${key_path}.pub"
@@ -245,12 +238,12 @@ read -r random
if [[ -z "$random" || "$random" =~ ^[nN]$ ]]; then if [[ -z "$random" || "$random" =~ ^[nN]$ ]]; then
echo -e "No random data added. ${GREEN}OK!${RESET}\n" echo -e "No random data added. ${GREEN}OK!${RESET}\n"
else else
printf 'random: adding 1/2 random blocks of data (128 bytes) to outer archive...\n' printf 'random: adding 1/2 random blocks of data (32 bytes) to outer archive...\n'
openssl rand -out "$out_dir/.$RANDOM" 128 >/dev/null 2>&1 openssl rand -out "$out_dir/.$RANDOM" >/dev/null 2>&1
checkcode $? checkcode $?
printf 'random: adding 2/2 random blocks of data (128 bytes) to inner archive...\n' printf 'random: adding 2/2 random blocks of data (32 bytes) to inner archive...\n'
openssl rand -out "$inner_dir/.$RANDOM" 128 >/dev/null 2>&1 openssl rand -out "$inner_dir/.$RANDOM" 32 >/dev/null 2>&1
checkcode $? checkcode $?
fi fi
@@ -285,9 +278,13 @@ read -r -s attribution_passphrase_check
printf '\n' printf '\n'
printf 'Auditing attribution passphrase...\n' printf 'Auditing attribution passphrase...\n'
ret==`audit_passphrase "$attribution_passphrase" "$attribution_passphrase_check"` ret=`audit_passphrase "$attribution_passphrase" "$attribution_passphrase_check"`
echo "$ret" echo "$ret"
printf 'Saving Attribution Passphrase'
echo "$attribution_passphrase" > "$attribution_keystore"
checkcode $?
printf 'Unsetting attribution_passphrase_check...\n' printf 'Unsetting attribution_passphrase_check...\n'
unset attribution_passphrase_check unset attribution_passphrase_check
@@ -341,8 +338,8 @@ unset keystore_passphrase_check
printf 'Archiving keys...\n' printf 'Archiving keys...\n'
set +u set +u
shopt -s nullglob shopt -s nullglob
private_files=(private_*) private_files=(.private_*)
passphrase_files=(attribution_passphrase_*) passphrase_files=(.attribution_*)
shopt -u nullglob shopt -u nullglob
set -u set -u
if [[ ${#private_files[@]} -eq 0 && ${#passphrase_files[@]} -eq 0 ]]; then if [[ ${#private_files[@]} -eq 0 && ${#passphrase_files[@]} -eq 0 ]]; then
View File