reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities
Shell bug-bountybugbountybugbounty-tooldnshackingnucleiosintpenetration-testingpentestpentest-toolpentestingreconreconnaissancescannersecuritysecurity-toolssubdomainsubdomain-enumerationvulnerabilities
ci: add macOS smoke lane and fix macOS bash path detection
tr3ss771effa8ca4c
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex e3acfad..153bc6d 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -61,6 +61,32 @@ jobs:- name: Run integration smoke testsrun: ./tests/run_tests.sh --smoke+ macos-smoke:+ name: macos-smoke+ runs-on: macos-latest+ steps:+ - name: Checkout code+ uses: actions/checkout@v4++ - name: Install dependencies+ run: |+ brew update+ brew install bash bats-core jq coreutils gnu-getopt gnu-sed++ - name: Configure GNU toolchain PATH+ run: |+ BREW_PREFIX="$(brew --prefix)"+ echo "$BREW_PREFIX/bin" >> "$GITHUB_PATH"+ echo "$BREW_PREFIX/opt/coreutils/libexec/gnubin" >> "$GITHUB_PATH"+ echo "$BREW_PREFIX/opt/gnu-getopt/bin" >> "$GITHUB_PATH"+ echo "$BREW_PREFIX/opt/gnu-sed/libexec/gnubin" >> "$GITHUB_PATH"++ - name: Run unit tests+ run: ./tests/run_tests.sh --unit++ - name: Run integration smoke tests+ run: ./tests/run_tests.sh --smoke+integration-full:name: integration-fullruns-on: ubuntu-latestdiff --git a/install.sh b/install.shindex 789a82c..0c3c5fe 100755--- a/install.sh+++ b/install.sh@@ -7,9 +7,23 @@ set -Eset +eIFS=$'\n\t'-# Detect if the script is being run in MacOS with Homebrew Bash-if [[ $OSTYPE == "darwin"* && $BASH != "/opt/homebrew/bin/bash" ]]; then- exec /opt/homebrew/bin/bash "$0" "$@"+# Detect if the script is being run in macOS and re-exec with modern Bash.+# Supports both Apple Silicon (/opt/homebrew) and Intel (/usr/local) Homebrew prefixes.+if [[ $OSTYPE == "darwin"* ]]; then+ _mac_bash=""+ for _candidate in /opt/homebrew/bin/bash /usr/local/bin/bash /bin/bash; do+ if [[ -x "$_candidate" ]]; then+ _major="$("$_candidate" -lc 'echo "${BASH_VERSINFO[0]}"' 2>/dev/null || echo 0)"+ if [[ "$_major" =~ ^[0-9]+$ ]] && [[ "$_major" -ge 4 ]]; then+ _mac_bash="$_candidate"+ break+ fi+ fi+ done+ if [[ -n "$_mac_bash" ]] && [[ "$BASH" != "$_mac_bash" ]]; then+ exec "$_mac_bash" "$0" "$@"+ fi+ unset _mac_bash _candidate _majorfi# Load main configurationdiff --git a/reconftw.sh b/reconftw.shindex 20ef12e..56a5a02 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -35,9 +35,23 @@ fi# ░ ░ ░░ ░ ░ ░ ░ ░#-# Detect if the script is being run (not sourced) in MacOS with Homebrew Bash-if [[ "${BASH_SOURCE[0]}" == "${0}" && $OSTYPE == "darwin"* && $BASH != "/opt/homebrew/bin/bash" ]]; then- exec /opt/homebrew/bin/bash "$0" "$@"+# Detect if the script is being run (not sourced) in macOS and re-exec with modern Bash.+# Supports both Apple Silicon (/opt/homebrew) and Intel (/usr/local) Homebrew prefixes.+if [[ "${BASH_SOURCE[0]}" == "${0}" && $OSTYPE == "darwin"* ]]; then+ _mac_bash=""+ for _candidate in /opt/homebrew/bin/bash /usr/local/bin/bash /bin/bash; do+ if [[ -x "$_candidate" ]]; then+ _major="$("$_candidate" -lc 'echo "${BASH_VERSINFO[0]}"' 2>/dev/null || echo 0)"+ if [[ "$_major" =~ ^[0-9]+$ ]] && [[ "$_major" -ge 4 ]]; then+ _mac_bash="$_candidate"+ break+ fi+ fi+ done+ if [[ -n "$_mac_bash" ]] && [[ "$BASH" != "$_mac_bash" ]]; then+ exec "$_mac_bash" "$0" "$@"+ fi+ unset _mac_bash _candidate _majorfi# timeout/gtimeout compatibility