From eba484877639b40ac1a6e4336ba00b392d27a24c Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 17 Jun 2025 19:02:12 -0400 Subject: [PATCH 1/3] Add MIT license and root README --- LICENSE | 21 +++++++++++++++++++++ README.md | 5 +++++ 2 files changed, 26 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7d2b621 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2025 thePR0M3TH3AN + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..c21eeb5 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# VoxVera + +This repository contains scripts and hosted assets for generating flyers and obfuscating web content. Additional documentation is available in the `src/` directory. + +This project is licensed under the [MIT License](./LICENSE). From cc2aa3b01d1f708953c278255438d118a50fd53c Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 17 Jun 2025 19:02:30 -0400 Subject: [PATCH 2/3] Add dependency checks and strict shell options --- src/create_flyer.sh | 16 ++++++++++++---- src/obfuscate_index.sh | 13 +++++++++++++ src/obfuscate_nostr.sh | 13 +++++++++++++ 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/create_flyer.sh b/src/create_flyer.sh index 16357c2..97d6cfe 100755 --- a/src/create_flyer.sh +++ b/src/create_flyer.sh @@ -1,6 +1,17 @@ #!/bin/bash -set -e +set -euo pipefail + +require_cmd() { + command -v "$1" >/dev/null 2>&1 || { + echo "Error: required command '$1' not found" >&2 + exit 1 + } +} + +for cmd in jq node javascript-obfuscator html-minifier-terser; do + require_cmd "$cmd" +done CONFIG_PATH="src/config.json" FROM_PDF="" @@ -32,9 +43,6 @@ while [[ $# -gt 0 ]]; do esac done -# Ensure jq is installed -command -v jq >/dev/null 2>&1 || { echo "jq is required" >&2; exit 1; } - # Helper function to update config update_config_interactive() { read -rp "Name: " name diff --git a/src/obfuscate_index.sh b/src/obfuscate_index.sh index efff80b..0e73187 100755 --- a/src/obfuscate_index.sh +++ b/src/obfuscate_index.sh @@ -1,5 +1,18 @@ #!/bin/bash +set -euo pipefail + +require_cmd() { + command -v "$1" >/dev/null 2>&1 || { + echo "Error: required command '$1' not found" >&2 + exit 1 + } +} + +for cmd in javascript-obfuscator html-minifier-terser node; do + require_cmd "$cmd" +done + # Input and output file names input_file="index-master.html" output_file="index.html" diff --git a/src/obfuscate_nostr.sh b/src/obfuscate_nostr.sh index ed574f3..a0d0a53 100755 --- a/src/obfuscate_nostr.sh +++ b/src/obfuscate_nostr.sh @@ -1,5 +1,18 @@ #!/bin/bash +set -euo pipefail + +require_cmd() { + command -v "$1" >/dev/null 2>&1 || { + echo "Error: required command '$1' not found" >&2 + exit 1 + } +} + +for cmd in javascript-obfuscator html-minifier-terser node; do + require_cmd "$cmd" +done + # Input and output file names input_file="nostr-master.html" output_file="nostr.html" From 667e84a1acbe8ad1466c6463e4eae17aa5567be0 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Tue, 17 Jun 2025 19:02:49 -0400 Subject: [PATCH 3/3] Add .gitignore for build outputs and temporary files --- .gitignore | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0b44106 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +# Ignore build outputs in host directories +host/*/*.html +host/*/*.png +host/*/*.pdf +host/*/from_client/ + +# Temporary files +*.tmp +tmp*/ + +# OS and editor files +.DS_Store +Thumbs.db +*~ +*.swp