migration

This commit is contained in:
2026-05-26 20:41:44 -06:00
parent 946f29c7e2
commit 2b401d6ed7
9 changed files with 162 additions and 2 deletions
+3
View File
@@ -80,3 +80,6 @@ todo
- better antiforensics by unsetting vars and cleaning up on exit
- actually workan password checks
- actually workan nice :3 mo stable mo sanity checks mo safety settings and methods
hii
+69
View File
@@ -0,0 +1,69 @@
#!/bin/bash
# file paths
sha256_file_path=./checksums.sha256
md5_file_path=./checksums.md5
error_log=./checksums_error.log
# text colors
RED='\e[31m'
GREEN='\e[32m'
RESET='\e[0m'
# set these false at the start to be safe
checksha256=false
checkmd5=false
# output errors to error log
exec 2> >(tee -a "$error_log" >&2)
# environment checks
## check for presence of $sha256_file_path, fail with general error on error
if [ ! -f "$sha256_file_path" ]; then
echo -e "\n${RED}FAIL!${RESET} File $sha256_file_path Not Found!\n" >&2
exit 1
fi
## check if $sha256_file_path is writable
if [ ! -r "$sha256_file_path" ]; then
echo -e "\n${RED}FAIL!${RESET} File $sha256_file_path Exists But Not Readable!\n" >&2
exit 1
fi
## check for presence of $md5_file_path, fail with general error on error
if [ ! -f "$md5_file_path" ]; then
echo -e "\nFAIL! File $md5_file_path Not Found!\n" >&2
exit 1
fi
## check if $md5_file_path is writable
if [ ! -r "$md5_file_path" ]; then
echo -e "\n${RED}FAIL!${RESET} File $md5_file_path Exists But Not Readable!\n" >&2
exit 1
fi
# check checksums
## check sha256
if sha256sum -c "$sha256_file_path" 1>/dev/null; then
echo -e "SHA256 Checksums: ${GREEN}OK!${RESET}"
checksha256=true
else
echo -e "\n\nSHA256 Checksums: ${RED}BAD!${RESET}\nDumping SHA256 Checksum Fails:" >&2
sha256sum -c "$sha256_file_path" | grep 'FAILED' >&2
echo -e "\nSHA256 Checksums: ${RED}BAD!${RESET}\n" >&2
fi
## check md5
if md5sum -c "$md5_file_path" 1>/dev/null; then
echo -e "MD5 checksums: ${GREEN}OK!${RESET}"
checkmd5=true
else
echo -e "\n\nFAIL: MD5 Checksums: ${RED}BAD!${RESET}\n\tDumping MD5 Checksum Fails:" >&2
md5sum -c "md5_file_path" | grep 'FAILED' >&2
echo -e "\nMD5 Checksums: ${RED}BAD!${RESET}\n" >&2
fi
# tally checks
if [[ $checksha256 == true && $checkmd5 == true ]]; then
echo -e "\nFile Integrity: VERIFIED! All Checksums: ${GREEN}OK!${RESET}\n"
exit 0 # exit success
else
echo -e "\nFile Integrity Check: ${RED}FAILED!${RESET}\n\tSee Above or See $error_log" >&2
exit 1 # exit general failure
fi
+16
View File
@@ -0,0 +1,16 @@
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
@@ -0,0 +1,31 @@
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
View File
+40
View File
@@ -0,0 +1,40 @@
#!/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
+1
View File
@@ -0,0 +1 @@
Tuesday, May 26 2026 at 06:42:27 PM MDT (unix seconds 1779842547)
View File