Building 70 Projects ranging from beginner to advanced so anyone can β learn from, build upon, use as a reference, or even copy directly. Owned by my cybersecurity company π
Go aicertificationcloud-engineeringcybercybersecuritycybersecurity-analystcybersecurity-certificationcybersecurity-certificationscybersecurity-educationcybersecurity-jobscybersecurity-portfoliocybersecurity-projectscybersecurity-toolsgrchackinglearningpentestingproject-repositoryprojetcspython
fix(lisdex): install.sh died silently the moment AFL++ was present
CarterPerez-devc37ffe5255ad
diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/install.sh b/PROJECTS/advanced/zero-day-vulnerability-scanner/install.shindex b80a7d15..79e49cf5 100755--- a/PROJECTS/advanced/zero-day-vulnerability-scanner/install.sh+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/install.sh@@ -204,7 +204,10 @@ need_system_deps() {}afl_version() {- afl-fuzz -h 2>&1 | head -1 | sed -E 's/.*afl-fuzz\+\+([0-9.]+[a-z]*).*/\1/' | head -1+ local banner="" first=""+ banner="$(afl-fuzz -h 2>&1 || true)"+ first="${banner%%$'\n'*}"+ printf '%s\n' "$first" | sed -E 's/.*afl-fuzz\+\+([0-9.]+[a-z]*).*/\1/'}need_afl() {diff --git a/PROJECTS/advanced/zero-day-vulnerability-scanner/scripts/m10-gate.sh b/PROJECTS/advanced/zero-day-vulnerability-scanner/scripts/m10-gate.shindex 0dc74007..4afa1c73 100755--- a/PROJECTS/advanced/zero-day-vulnerability-scanner/scripts/m10-gate.sh+++ b/PROJECTS/advanced/zero-day-vulnerability-scanner/scripts/m10-gate.sh@@ -192,6 +192,18 @@ elsefail "no binary at $SANDBOX/bin/lisdex"fi+AFL_PROBE="$GATE/afl-version-probe.sh"+awk '/^afl_version\(\) \{/,/^\}/' install.sh > "$AFL_PROBE"+if ! command -v afl-fuzz >/dev/null 2>&1; then+ fail "no afl-fuzz here, so the afl_version probe below cannot discriminate"+elif [ ! -s "$AFL_PROBE" ]; then+ fail "could not extract afl_version from install.sh; the probe would pass vacuously"+elif bash -c "set -euo pipefail; . '$AFL_PROBE'; v=\"\$(afl_version)\"; [ -n \"\$v\" ]" 2>/dev/null; then+ pass "afl_version returns a version and survives set -euo pipefail"+else+ fail "afl_version kills the shell under pipefail, and --skip-afl hides that from the install above"+fi+INSTALLED_VERSION="$(PATH="$SANDBOX/bin:$PATH" lisdex --version 2>/dev/null || true)"if [ -n "$INSTALLED_VERSION" ]; thenpass "it runs by its bare name: $INSTALLED_VERSION"