Skip to content

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

cewler replaces cewl

six2dez0660c46fef94
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd10db9..497b966 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,7 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Katana headless profile selection: `KATANA_HEADLESS_PROFILE=off|smart|full`.
- DEEP-only ffuf recursion: `FUZZ_RECURSION_DEPTH`.
- CDN origin discovery (best-effort) via `hakoriginfinder` with `CDN_BYPASS=true` (output `hosts/origin_ips.txt`).
-- Password dictionary engine `cewl` (Ruby gem) with tuning knobs.
+- Password dictionary engine `cewler` (Python) with tuning knobs.
- Adaptive permutation wordlist: `PERMUTATIONS_WORDLIST_MODE=auto|full|short` with `PERMUTATIONS_SHORT_THRESHOLD=100`. Uses a curated 162-word list for large targets (>100 subs) and the full 849-word list for small targets or DEEP mode.
- Auto-detection of DNS resolver: `DNS_RESOLVER=auto|puredns|dnsx`. Detects if running behind NAT/CGNAT (non-public IPv4) and switches to dnsx (Go net resolver, safe for home routers) instead of puredns (massdns raw UDP sockets that can overwhelm consumer router NAT tables). Configurable with `DNSX_THREADS` and `DNSX_RATE_LIMIT`.
- Global DNS resolution wrappers `_resolve_domains()` and `_bruteforce_domains()` in `modules/utils.sh` — all 16 puredns call sites now use these wrappers for consistent resolver selection.
@@ -28,7 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed `webprobe_simple()` httpx merge bug (probe output now correctly merged with prior cache).
- Wrapped local `wafw00f` execution with `run_command` for dry-run/log consistency.
- `PORTSCAN_ACTIVE_OPTIONS` default no longer includes `--script vulners`; moved to `PORTSCAN_DEEP_OPTIONS`.
-- `ssti`: if `tinja` is missing, the module warns and skips (no automatic ffuf fallback).
+- `ssti`: if `TInjA` is missing, the module warns and skips (no automatic ffuf fallback).
- `iishortname`: uses `shortscan` only (sns removed).
- `nuclei_dast`: when vuln scanning is enabled (`VULNS_GENERAL=true`, e.g. `-a`), the DAST pass is force-enabled to avoid accidental coverage loss.
- Permutation engine simplified to gotator-only (benchmark showed gotator produces the best quality permutations with exclusive valid findings that other tools miss).
@@ -130,7 +130,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `toxicache` for additional web cache poisoning coverage.
- `postleaksNg` in `apileaks` for Postman leak discovery.
- `favirecon` as `favirecon_tech` for favicon-based technology reconnaissance.
- - `TInjA` as the default `ssti` engine (`SSTI_ENGINE=tinja`, with legacy fallback).
+ - `TInjA` as the default `ssti` engine (`SSTI_ENGINE=TInjA`, with legacy fallback).
- `second-order` as default `brokenLinks` engine (`BROKENLINKS_ENGINE=second-order`, with legacy fallback).
**Progress and UX**
diff --git a/README.md b/README.md
index 7007e83..48da4d2 100644
--- a/README.md
+++ b/README.md
@@ -163,7 +163,7 @@ reconFTW is packed with features to make reconnaissance thorough and efficient.
- **Fuzzing**: Performs directory and parameter fuzzing ([ffuf](https://github.com/ffuf/ffuf)).
- **File Extension Sorting**: Organizes URLs by file extensions.
- **Wordlist Generation**: Creates custom wordlists for fuzzing.
-- **Password Dictionary**: Generates password dictionaries from live content ([cewl](https://github.com/digininja/CeWL)).
+- **Password Dictionary**: Generates password dictionaries from live content ([cewler](https://github.com/roys/cewler)).
- **IIS Shortname Scanning**: Detects IIS shortname vulnerabilities ([shortscan](https://github.com/bitquark/shortscan)).
### Vulnerability Checks
@@ -646,7 +646,7 @@ SSRF_CHECKS=true # SSRF checks
CRLF_CHECKS=true # CRLF checks
LFI=true # LFI by fuzzing
SSTI=true # SSTI by fuzzing
-SSTI_ENGINE="tinja" # SSTI engine: tinja|legacy
+SSTI_ENGINE="TInjA" # SSTI engine: TInjA|legacy
SQLI=true # Check SQLI
SQLMAP=true # Check SQLI with sqlmap
GHAURI=false # Check SQLI with ghauri
diff --git a/config/reconftw_full.cfg b/config/reconftw_full.cfg
index e3d1e9b..44dd20b 100644
--- a/config/reconftw_full.cfg
+++ b/config/reconftw_full.cfg
@@ -82,7 +82,7 @@ SSRF_CHECKS=true
CRLF_CHECKS=true
LFI=true
SSTI=true
-SSTI_ENGINE="tinja"
+SSTI_ENGINE="TInjA"
SQLI=true
SQLMAP=true
GHAURI=true
diff --git a/config/reconftw_quick.cfg b/config/reconftw_quick.cfg
index 0309209..089e521 100644
--- a/config/reconftw_quick.cfg
+++ b/config/reconftw_quick.cfg
@@ -59,7 +59,7 @@ FUZZPARAMS=false
NUCLEI_DAST=false
WEBCACHE_TOXICACHE=false
BROKENLINKS_ENGINE="legacy"
-SSTI_ENGINE="tinja"
+SSTI_ENGINE="TInjA"
# Disable heavy extras
GRAPHQL_CHECK=false
diff --git a/config/reconftw_stealth.cfg b/config/reconftw_stealth.cfg
index 3dd6841..c4d43ba 100644
--- a/config/reconftw_stealth.cfg
+++ b/config/reconftw_stealth.cfg
@@ -93,7 +93,7 @@ FUZZPARAMS=false
NUCLEI_DAST=false
WEBCACHE_TOXICACHE=false
BROKENLINKS_ENGINE="legacy"
-SSTI_ENGINE="tinja"
+SSTI_ENGINE="TInjA"
# Nuclei: only safe templates
NUCLEICHECK=true
diff --git a/install.sh b/install.sh
index d6b9c8c..04303c0 100755
--- a/install.sh
+++ b/install.sh
@@ -246,8 +246,7 @@ declare -A gotools=(
["toxicache"]="go install -v github.com/xhzeem/toxicache@latest"
["favirecon"]="go install -v github.com/edoardottt/favirecon/cmd/favirecon@latest"
["second-order"]="go install -v github.com/mhmdiaa/second-order@latest"
- ["tinja"]="go install -v github.com/Hackmanit/TInjA@latest"
- ["cewl"]="gem install cewl --no-document"
+ ["TInjA"]="go install -v github.com/Hackmanit/TInjA@latest"
)
# Declare pipx tools and their paths
@@ -280,6 +279,7 @@ declare -A repos=(
["testssl.sh"]="drwetter/testssl.sh"
["JSA"]="w9w/JSA"
["CloudHunter"]="belane/CloudHunter"
+ ["cewler"]="roys/cewler"
["ultimate-nmap-parser"]="shifty0g/ultimate-nmap-parser"
["gitdorks_go"]="damit5/gitdorks_go"
["Web-Cache-Vulnerability-Scanner"]="Hackmanit/Web-Cache-Vulnerability-Scanner"
@@ -518,7 +518,7 @@ function install_tools() {
"trufflehog")
go install &>/dev/null
;;
- "postleaksNg")
+ "postleaksNg"|"cewler")
if [[ ! -d "venv" ]]; then
python3 -m venv venv &>/dev/null || true
fi
diff --git a/modules/core.sh b/modules/core.sh
index 6b2179e..ad6ea62 100644
--- a/modules/core.sh
+++ b/modules/core.sh
@@ -289,7 +289,7 @@ function tools_installed() {
["naabu"]="naabu"
["porch-pirate"]="porch-pirate"
["shortscan"]="shortscan"
- ["cewl"]="cewl"
+ ["cewler"]="cewler"
["hakoriginfinder"]="hakoriginfinder"
["sourcemapper"]="sourcemapper"
["jsluice"]="jsluice"
@@ -306,7 +306,7 @@ function tools_installed() {
["cloud_enum"]="cloud_enum"
["toxicache"]="toxicache"
["favirecon"]="favirecon"
- ["tinja"]="tinja"
+ ["TInjA"]="TInjA"
["second-order"]="second-order"
)
diff --git a/modules/vulns.sh b/modules/vulns.sh
index e772915..9505390 100644
--- a/modules/vulns.sh
+++ b/modules/vulns.sh
@@ -298,8 +298,8 @@ function ssti() {
# Ensure gf/ssti.txt is not empty
if [[ -s "gf/ssti.txt" ]]; then
- local ssti_engine="${SSTI_ENGINE:-tinja}"
- if [[ "$ssti_engine" != "tinja" ]]; then
+ local ssti_engine="${SSTI_ENGINE:-TInjA}"
+ if [[ "$ssti_engine" != "TInjA" ]]; then
_print_msg WARN "SSTI_ENGINE='${ssti_engine}' is deprecated; using TInjA."
fi
@@ -313,28 +313,28 @@ function ssti() {
if [[ $DEEP == true ]] || [[ $URL_COUNT -le $DEEP_LIMIT ]]; then
: >".tmp/ssti_candidates.txt"
- if ! command -v tinja >/dev/null 2>&1; then
+ if ! command -v TInjA >/dev/null 2>&1; then
end_func "Skipping SSTI: TInjA not installed (no legacy fallback)." "${FUNCNAME[0]}" "SKIP_MISSING_TOOL"
return 0
fi
_print_msg INFO "Running: SSTI Checks with TInjA"
- local tinja_report_dir="$dir/.tmp/tinja"
- mkdir -p "$tinja_report_dir"
- local -a tinja_cmd=(tinja url --reportpath "${tinja_report_dir}/" --ratelimit "${TINJA_RATELIMIT:-0}" --timeout "${TINJA_TIMEOUT:-15}" --verbosity 0)
+ local TInjA_report_dir="$dir/.tmp/TInjA"
+ mkdir -p "$TInjA_report_dir"
+ local -a TInjA_cmd=(TInjA url --reportpath "${TInjA_report_dir}/" --ratelimit "${TInjA_RATELIMIT:-0}" --timeout "${TInjA_TIMEOUT:-15}" --verbosity 0)
if [[ -n "${HEADER:-}" ]]; then
- tinja_cmd+=(-H "${HEADER}")
+ TInjA_cmd+=(-H "${HEADER}")
fi
while IFS= read -r u; do
- [[ -n "$u" ]] && tinja_cmd+=(--url "$u")
+ [[ -n "$u" ]] && TInjA_cmd+=(--url "$u")
done <".tmp/tmp_ssti.txt"
- if ! run_command "${tinja_cmd[@]}" 2>>"$LOGFILE" >/dev/null; then
- log_note "ssti: tinja execution failed, no findings collected" "${FUNCNAME[0]}" "${LINENO}"
+ if ! run_command "${TInjA_cmd[@]}" 2>>"$LOGFILE" >/dev/null; then
+ log_note "ssti: TInjA execution failed, no findings collected" "${FUNCNAME[0]}" "${LINENO}"
fi
local report_file=""
- report_file=$(ls -1t "${tinja_report_dir}"/*.jsonl 2>/dev/null | head -n 1 || true)
+ report_file=$(ls -1t "${TInjA_report_dir}"/*.jsonl 2>/dev/null | head -n 1 || true)
if [[ -n "$report_file" && -s "$report_file" ]]; then
jq -r 'select((.isWebpageVulnerable == true) or any(.parameters[]?; .isParameterVulnerable == true)) | (.url // empty) + " [certainty:" + (.certainty // "unknown") + "]"' "$report_file" 2>/dev/null \
| sed '/^\s*$/d' \
@@ -342,7 +342,7 @@ function ssti() {
fi
if [[ -s ".tmp/ssti_candidates.txt" ]]; then
- cat ".tmp/ssti_candidates.txt" | anew -q "vulns/ssti_tinja.txt"
+ cat ".tmp/ssti_candidates.txt" | anew -q "vulns/ssti_TInjA.txt"
cat ".tmp/ssti_candidates.txt" | anew -q "vulns/ssti.txt"
fi
diff --git a/modules/web.sh b/modules/web.sh
index 7e6e2cc..0508448 100644
--- a/modules/web.sh
+++ b/modules/web.sh
@@ -1935,22 +1935,22 @@ function password_dict() {
start_func "${FUNCNAME[0]}" "Password Dictionary Generation"
- local dict_engine="${PASSWORD_DICT_ENGINE:-cewl}"
+ local dict_engine="${PASSWORD_DICT_ENGINE:-cewler}"
local dict_output="$dir/webs/password_dict.txt"
: >"$dict_output"
- # Ensure web targets exist for cewl.
+ # Ensure web targets exist for cewler.
ensure_webs_all || true
- if [[ "$dict_engine" == "cewl" ]]; then
- local cewl_cmd=()
- if command -v cewl >/dev/null 2>&1; then
- cewl_cmd=(cewl)
- elif [[ -f "${tools}/CeWL/cewl.rb" ]]; then
- cewl_cmd=(ruby "${tools}/CeWL/cewl.rb")
+ if [[ "$dict_engine" == "cewler" ]]; then
+ local cewler_cmd=()
+ if command -v cewler >/dev/null 2>&1; then
+ cewler_cmd=(cewler)
+ elif [[ -x "${tools}/cewler/venv/bin/cewler" ]]; then
+ cewler_cmd=("${tools}/cewler/venv/bin/cewler")
fi
- if [[ ${#cewl_cmd[@]} -gt 0 ]] && [[ -s "webs/webs_all.txt" ]]; then
+ if [[ ${#cewler_cmd[@]} -gt 0 ]] && [[ -s "webs/webs_all.txt" ]]; then
local max_targets="${PASSWORD_DICT_MAX_TARGETS:-50}"
if [[ ${DEEP:-false} == true ]]; then
max_targets=0
@@ -1965,13 +1965,13 @@ function password_dict() {
while IFS= read -r target; do
[[ -z "$target" ]] && continue
if [[ -n "${TIMEOUT_CMD:-}" ]]; then
- run_command "$TIMEOUT_CMD" -k 5s "${PASSWORD_DICT_CEWL_TIMEOUT:-45}" "${cewl_cmd[@]}" "$target" \
- -d "${PASSWORD_DICT_CEWL_DEPTH:-1}" -m "${PASSWORD_MIN_LENGTH:-5}" \
- -w ".tmp/password_dict_part.txt" 2>>"$LOGFILE" >/dev/null || true
+ run_command "$TIMEOUT_CMD" -k 5s "${PASSWORD_DICT_CEWLER_TIMEOUT:-45}" "${cewler_cmd[@]}" \
+ -d "${PASSWORD_DICT_CEWLER_DEPTH:-1}" -m "${PASSWORD_MIN_LENGTH:-5}" \
+ -l -o ".tmp/password_dict_part.txt" "$target" 2>>"$LOGFILE" >/dev/null || true
else
- run_command "${cewl_cmd[@]}" "$target" \
- -d "${PASSWORD_DICT_CEWL_DEPTH:-1}" -m "${PASSWORD_MIN_LENGTH:-5}" \
- -w ".tmp/password_dict_part.txt" 2>>"$LOGFILE" >/dev/null || true
+ run_command "${cewler_cmd[@]}" \
+ -d "${PASSWORD_DICT_CEWLER_DEPTH:-1}" -m "${PASSWORD_MIN_LENGTH:-5}" \
+ -l -o ".tmp/password_dict_part.txt" "$target" 2>>"$LOGFILE" >/dev/null || true
fi
if [[ -s ".tmp/password_dict_part.txt" ]]; then
cat ".tmp/password_dict_part.txt" >>".tmp/password_dict_raw.txt"
@@ -1982,7 +1982,7 @@ function password_dict() {
if [[ -s ".tmp/password_dict_raw.txt" ]]; then
awk -v min="${PASSWORD_MIN_LENGTH:-5}" -v max="${PASSWORD_MAX_LENGTH:-14}" '
{
- w=tolower($0);
+ w=$0;
gsub(/[^a-z0-9._-]/, "", w);
if (length(w) >= min && length(w) <= max) print w;
}' ".tmp/password_dict_raw.txt" | sort -u >"$dict_output"
@@ -1990,14 +1990,14 @@ function password_dict() {
fi
fi
- # Fallback to pydictor when cewl is unavailable/empty or explicitly requested.
+ # Fallback to pydictor when cewler is unavailable/empty or explicitly requested.
if [[ ! -s "$dict_output" ]] || [[ "$dict_engine" == "pydictor" ]]; then
local word="${domain%%.*}"
if [[ -s "${tools}/pydictor/pydictor.py" ]]; then
run_command python3 "${tools}/pydictor/pydictor.py" -extend "$word" --leet 0 1 2 11 21 --len "$PASSWORD_MIN_LENGTH" "$PASSWORD_MAX_LENGTH" -o "$dict_output" 2>>"$LOGFILE" >/dev/null
- [[ "$dict_engine" == "cewl" ]] && log_note "password_dict: cewl unavailable/empty, pydictor fallback used" "${FUNCNAME[0]}" "${LINENO}"
- elif [[ "$dict_engine" == "cewl" ]]; then
- log_note "password_dict: cewl and pydictor unavailable, skipping output generation" "${FUNCNAME[0]}" "${LINENO}"
+ [[ "$dict_engine" == "cewler" ]] && log_note "password_dict: cewler unavailable/empty, pydictor fallback used" "${FUNCNAME[0]}" "${LINENO}"
+ elif [[ "$dict_engine" == "cewler" ]]; then
+ log_note "password_dict: cewler and pydictor unavailable, skipping output generation" "${FUNCNAME[0]}" "${LINENO}"
fi
fi
diff --git a/reconftw.cfg b/reconftw.cfg
index 16ace26..7301d57 100644
--- a/reconftw.cfg
+++ b/reconftw.cfg
@@ -213,10 +213,10 @@ CMS_SCANNER=true # CMS scanner
WORDLIST=true # Wordlist generation
ROBOTSWORDLIST=true # Check historic disallow entries on waybackMachine
PASSWORD_DICT=true # Generate password dictionary
-PASSWORD_DICT_ENGINE=cewl # cewl|pydictor
-PASSWORD_DICT_MAX_TARGETS=50 # Max web targets processed by cewl when not DEEP
-PASSWORD_DICT_CEWL_DEPTH=1 # cewl crawl depth
-PASSWORD_DICT_CEWL_TIMEOUT=45 # timeout (seconds) per target when cewl runs
+PASSWORD_DICT_ENGINE=cewler # cewler|pydictor
+PASSWORD_DICT_MAX_TARGETS=50 # Max web targets processed by cewler when not DEEP
+PASSWORD_DICT_CEWLER_DEPTH=1 # cewler crawl depth
+PASSWORD_DICT_CEWLER_TIMEOUT=45 # timeout (seconds) per target when cewler runs
PASSWORD_MIN_LENGTH=5 # Min password length
PASSWORD_MAX_LENGTH=14 # Max password length
KATANA_HEADLESS_PROFILE=off # off|smart|full
@@ -232,9 +232,9 @@ SSRF_ALT_MATCH_REGEX="169\\.254\\.169\\.254|latest/meta-data|root:|127\\.0\\.0\\
CRLF_CHECKS=true # CRLF checks
LFI=true # LFI by fuzzing
SSTI=true # SSTI by fuzzing
-SSTI_ENGINE="tinja" # SSTI engine (legacy mode removed)
-TINJA_RATELIMIT=0 # TInjA requests per second (0 = unlimited)
-TINJA_TIMEOUT=15 # TInjA request timeout seconds
+SSTI_ENGINE="TInjA" # SSTI engine (legacy mode removed)
+TInjA_RATELIMIT=0 # TInjA requests per second (0 = unlimited)
+TInjA_TIMEOUT=15 # TInjA request timeout seconds
SQLI=true # Check SQLI
SQLMAP=true # Check SQLI with sqlmap
GHAURI=false # Check SQLI with ghauri
diff --git a/tests/unit/test_common.bats b/tests/unit/test_common.bats
index bb68f62..fa30843 100644
--- a/tests/unit/test_common.bats
+++ b/tests/unit/test_common.bats
@@ -239,7 +239,8 @@ teardown() {
@test "anew_q_safe returns 0 when anew adds new lines" {
local outfile="$TEST_DIR/out.txt"
touch "$outfile"
- run bash -c 'echo "newline" | anew_q_safe "'"$outfile"'"'
+ _run_anew_q() { echo "newline" | anew_q_safe "$outfile"; }
+ run _run_anew_q
[ "$status" -eq 0 ]
grep -q "newline" "$outfile"
}
@@ -247,14 +248,16 @@ teardown() {
@test "anew_q_safe returns 0 when anew adds no new lines (rc=1 from anew)" {
local outfile="$TEST_DIR/out.txt"
echo "duplicate" > "$outfile"
- run bash -c 'echo "duplicate" | anew_q_safe "'"$outfile"'"'
+ _run_anew_q_dup() { echo "duplicate" | anew_q_safe "$outfile"; }
+ run _run_anew_q_dup
[ "$status" -eq 0 ]
}
@test "anew_q_safe writes unique lines to file" {
local outfile="$TEST_DIR/out.txt"
echo "existing" > "$outfile"
- run bash -c 'printf "existing\nnewone\n" | anew_q_safe "'"$outfile"'"'
+ _run_anew_q_mix() { printf "existing\nnewone\n" | anew_q_safe "$outfile"; }
+ run _run_anew_q_mix
[ "$status" -eq 0 ]
grep -q "newone" "$outfile"
[ "$(wc -l < "$outfile")" -eq 2 ]
@@ -263,7 +266,8 @@ teardown() {
@test "anew_safe returns 0 and outputs new lines" {
local outfile="$TEST_DIR/out.txt"
echo "old" > "$outfile"
- run bash -c 'printf "old\nnew\n" | anew_safe "'"$outfile"'"'
+ _run_anew_mix() { printf "old\nnew\n" | anew_safe "$outfile"; }
+ run _run_anew_mix
[ "$status" -eq 0 ]
[[ "$output" == *"new"* ]]
grep -q "new" "$outfile"
diff --git a/tests/unit/test_new_tool_integrations.bats b/tests/unit/test_new_tool_integrations.bats
index 5a2fcf3..7468edf 100644
--- a/tests/unit/test_new_tool_integrations.bats
+++ b/tests/unit/test_new_tool_integrations.bats
@@ -29,11 +29,11 @@ teardown() {
[[ -d "$TEST_DIR" ]] && rm -rf "$TEST_DIR"
}
-@test "ssti uses tinja engine and writes compatible output" {
+@test "ssti uses TInjA engine and writes compatible output" {
mkdir -p gf .tmp vulns
printf 'https://target.example.com/?q=test\n' > gf/ssti.txt
- cat > "$MOCK_BIN/tinja" <<'SH'
+ cat > "$MOCK_BIN/TInjA" <<'SH'
#!/usr/bin/env bash
report_dir=""
while [[ $# -gt 0 ]]; do
@@ -50,12 +50,12 @@ done
mkdir -p "$report_dir"
printf '%s\n' '{"url":"https://target.example.com/?q=FUZZ","isWebpageVulnerable":true,"certainty":"high","parameters":[]}' > "${report_dir}/mock_Report.jsonl"
SH
- chmod +x "$MOCK_BIN/tinja"
+ chmod +x "$MOCK_BIN/TInjA"
export SSTI=true
- export SSTI_ENGINE="tinja"
- export TINJA_RATELIMIT=0
- export TINJA_TIMEOUT=15
+ export SSTI_ENGINE="TInjA"
+ export TInjA_RATELIMIT=0
+ export TInjA_TIMEOUT=15
export DEEP=false
export DEEP_LIMIT=500