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

docs(02-01): drop safe_count references from 5 doc files

six2dez0e896c1ef4df
diff --git a/.planning/codebase/ARCHITECTURE.md b/.planning/codebase/ARCHITECTURE.md
index 6aaf177..2a75c6d 100644
--- a/.planning/codebase/ARCHITECTURE.md
+++ b/.planning/codebase/ARCHITECTURE.md
@@ -60,7 +60,7 @@
| Axiom/distributed mode | `axiom_launch`, `axiom_shutdown`, `axiom_selected`, `resolvers_update`, `ipcidr_target` | `modules/axiom.sh` |
| Parallel execution | `parallel_funcs`, `_throttle_jobs`, job heartbeat, progress live display, log mode output | `lib/parallel.sh` |
| Input validation/sanitization | `sanitize_domain`, `sanitize_ip`, `validate_domain`, `validate_integer`, `_sanitize_list_entry` | `lib/validation.sh` |
-| Shared file/counter utilities | `ensure_dirs`, `ensure_webs_all`, `safe_backup`, `count_lines`, `safe_count`, incident tracking | `lib/common.sh` |
+| Shared file/counter utilities | `ensure_dirs`, `ensure_webs_all`, `safe_backup`, `count_lines`, incident tracking | `lib/common.sh` |
| UI presentation layer | `_print_status`, `_print_msg`, `_print_section`, `_print_rule`, `ui_header`, `ui_summary`, TTY detection, color management, JSONL output | `lib/ui.sh` |
| Configuration | All runtime settings (~350 variables); sourced after CLI parse | `reconftw.cfg` |
diff --git a/.planning/codebase/CONVENTIONS.md b/.planning/codebase/CONVENTIONS.md
index 0cb7c2c..16d0761 100644
--- a/.planning/codebase/CONVENTIONS.md
+++ b/.planning/codebase/CONVENTIONS.md
@@ -159,11 +159,11 @@ if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[
## Error Handling
-**`safe_count()`** in `lib/common.sh` — always returns a valid integer:
+**`count_lines()`** in `lib/common.sh` — counts non-empty lines in a file; returns 0 if missing or empty:
```bash
-NUMOFLINES=$(safe_count "subdomains/subdomains.txt") # preferred: direct file path
+NUMOFLINES=$(count_lines "subdomains/subdomains.txt")
```
-Falls back to `eval` for legacy pipeline strings (marked TODO for migration).
+For stdin-pipe inputs, use `count_lines_stdin` (e.g., `result=$(some_cmd | count_lines_stdin)`).
**Return codes:** Functions return 0 on success, non-zero on failure. Error codes are defined as `readonly` in `reconftw.sh`:
- `E_SUCCESS=0`, `E_GENERAL=1`, `E_MISSING_DEP=2`, `E_INVALID_INPUT=3`
diff --git a/.planning/codebase/STRUCTURE.md b/.planning/codebase/STRUCTURE.md
index 1bc0d69..8d3fb6c 100644
--- a/.planning/codebase/STRUCTURE.md
+++ b/.planning/codebase/STRUCTURE.md
@@ -15,7 +15,7 @@ reconftw/
│
├── lib/ # Pure utility libraries (no recon logic)
│ ├── validation.sh # Input sanitization: sanitize_domain, sanitize_ip, validate_*
-│ ├── common.sh # File/dir helpers, incident tracking, count_lines, safe_count
+│ ├── common.sh # File/dir helpers, incident tracking, count_lines
│ ├── ui.sh # TTY detection, color management, _print_status/_print_msg, progress
│ └── parallel.sh # parallel_funcs, _throttle_jobs, live progress, job output modes
│
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 57fb79b..41e241e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -200,7 +200,7 @@ The one-shot `-w` dispatch also sets `DIFF=true`, matching the global `DIFF=true
- Replaced repetitive utility patterns with centralized helpers:
- `ensure_dirs()`
- `skip_notification()`
- - `count_lines()`/`safe_count()`
+ - `count_lines()`
- `run_tool()`
- `should_run_function()`
- Profile configuration behavior changed to override-only semantics (preserving preloaded secrets/env).
diff --git a/CLAUDE.md b/CLAUDE.md
index 865143f..b5e0e46 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -280,7 +280,7 @@ reconFTW is a comprehensive bash-based reconnaissance automation framework used
| Axiom/distributed mode | `axiom_launch`, `axiom_shutdown`, `axiom_selected`, `resolvers_update`, `ipcidr_target` | `modules/axiom.sh` |
| Parallel execution | `parallel_funcs`, `_throttle_jobs`, job heartbeat, progress live display, log mode output | `lib/parallel.sh` |
| Input validation/sanitization | `sanitize_domain`, `sanitize_ip`, `validate_domain`, `validate_integer`, `_sanitize_list_entry` | `lib/validation.sh` |
-| Shared file/counter utilities | `ensure_dirs`, `ensure_webs_all`, `safe_backup`, `count_lines`, `safe_count`, incident tracking | `lib/common.sh` |
+| Shared file/counter utilities | `ensure_dirs`, `ensure_webs_all`, `safe_backup`, `count_lines`, incident tracking | `lib/common.sh` |
| UI presentation layer | `_print_status`, `_print_msg`, `_print_section`, `_print_rule`, `ui_header`, `ui_summary`, TTY detection, color management, JSONL output | `lib/ui.sh` |
| Configuration | All runtime settings (~350 variables); sourced after CLI parse | `reconftw.cfg` |
## Pattern Overview