Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 584d4e9075 | |||
| 55c6df5273 | |||
| 82426bb3f2 |
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# packages: 7zip, shred, secure-delete, cracklib-runtime, openssl, curl
|
# 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="keystore/private_ed25519_${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"
|
||||||
@@ -216,10 +215,6 @@ exit_cleanup() {
|
|||||||
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 +224,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"
|
||||||
@@ -246,11 +241,11 @@ 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 (128 bytes) to outer archive...\n'
|
||||||
openssl rand -out "$out_dir/.$RANDOM" 128 >/dev/null 2>&1
|
openssl rand -out "$out_dir/.$RANDOM" 16 >/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 (128 bytes) to inner archive...\n'
|
||||||
openssl rand -out "$inner_dir/.$RANDOM" 128 >/dev/null 2>&1
|
openssl rand -out "$inner_dir/.$RANDOM" 16 >/dev/null 2>&1
|
||||||
checkcode $?
|
checkcode $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -285,7 +280,7 @@ 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 'Unsetting attribution_passphrase_check...\n'
|
printf 'Unsetting attribution_passphrase_check...\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user