You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Patch-only release. Fixes:
- Data race in simulate mode via math/rand/v2 (goroutine-safe, auto-seeded).
- Send-on-closed-channel race in scan.Run progress ticker.
- TUI Aborted status on ctrl+c; form no longer blocks live mode on empty hit rate.
- -version reports v0.5.1.
- Docker build copies go.sum / go mod download; base image satisfies module Go version.
- Go minimum reconciled to 1.24.2 across go.mod, Dockerfile, README, docs.
Added tests: concurrent SimulateResolution, scan runner (concurrent + cancel),
TUI form validation.
CI: release workflow now also triggers on tag pushes (tags: ['v*']) so the
first tag actually builds and publishes binaries.
Docs: README facelift; ARCHITECTURE ticker interval (1s) and arg-parsing
(cliFlags + flag.*Var) corrected; removed unused docs/assets/title.svg.
CHANGELOG and ARCHITECTURE are scoped to 0.5.1 only (no unshipped features).
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+20-1Lines changed: 20 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
-
## [Unreleased]
8
+
## [0.5.1] - 2026-06-03
9
+
10
+
### Fixed
11
+
- Data race in simulation mode: migrated `internal/dns/simulate.go` to `math/rand/v2`, whose top-level functions are goroutine-safe and auto-seeded. `SimulateResolution` is now safe to call concurrently (previously a shared `*math/rand.Rand` was used from every worker).
12
+
- Send-on-closed-channel race in `scan.Run`: the progress ticker goroutine now signals its own exit (`tickerStopped`) and guards its send with a select, and `Run` waits for that exit before emitting `EventDone`, so the deferred `close(events)` can no longer race an in-flight ticker send.
13
+
- TUI now renders the "Aborted" status when a scan is cancelled with `ctrl+c` (the scan view is marked aborted so the subsequent `EventDone` shows partial counts).
14
+
- TUI form no longer blocks a live-mode scan when the Hit Rate field is empty or out of range; hit rate is validated only when Simulate is on.
15
+
-`-version` now reports the correct version (`subenum v0.5.1`).
16
+
- Docker build: the builder now copies `go.sum` and runs `go mod download` before building, the base image satisfies the module Go version, and `main_test.go` is no longer copied into the build image.
17
+
18
+
### Changed
19
+
- Go minimum version reconciled to 1.24.2 across `go.mod`, the Dockerfile base image, README, and docs (the charmbracelet TUI dependencies require it); direct vs indirect dependency classification corrected via `go mod tidy`.
20
+
21
+
### Added
22
+
- Tests: concurrent `SimulateResolution` test, `internal/scan` runner tests (concurrent simulate run and mid-scan context cancellation), and `internal/tui` form validation tests.
23
+
24
+
### Docs
25
+
- README facelift: plain-text description under the badges, a copy-paste quick-start block, the TUI screenshot promoted to a hero position, PRs-Welcome and platform badges, and removal of em dashes for a clean human-authored look.
26
+
- ARCHITECTURE: corrected the progress ticker interval (1 second) and the argument-parsing section (`flag.*Var` into a `cliFlags` struct).
27
+
- Removed the unused, duplicate `docs/assets/title.svg`.
***Purpose**: This component is responsible for processing the command-line arguments provided by the user when `subenum` is executed. It extracts the target domain, the path to the wordlist file, the desired number of concurrent workers, and the DNS lookup timeout.
43
-
***Implementation**: Utilizes Go's standard `flag` package.
44
-
*`flag.String("w", "", "Path to the wordlist file")`: Defines the wordlist file flag.
45
-
*`flag.Int("t", 100, "Number of concurrent workers")`: Defines the concurrency level flag.
46
-
*`flag.Int("timeout", 1000, "DNS lookup timeout in milliseconds")`: Defines the DNS timeout flag.
47
-
*`flag.String("dns-server", DefaultDNSServer, "DNS server to use")`: Defines the custom DNS server flag.
48
-
*`flag.Bool("v", false, "Enable verbose output")`: Defines the verbose flag.
49
-
*`flag.Bool("progress", true, "Show progress during scanning")`: Defines the progress reporting flag.
50
-
*`flag.Bool("version", false, "Show version information")`: Defines the version flag.
51
-
*`flag.String("o", "", "Write results to file")`: Defines the output file flag.
52
-
*`flag.Int("attempts", 0, "Total DNS resolution attempts per subdomain")`: Defines the attempt count flag.
53
-
*`flag.Int("retries", 0, "Deprecated: alias for -attempts")`: Deprecated retry flag.
54
-
*`flag.Bool("force", false, "Continue scanning on wildcard DNS")`: Defines the force flag.
55
-
*`flag.Parse()`: Parses the provided arguments.
43
+
***Implementation**: Utilizes Go's standard `flag` package.`parseFlags()` binds every flag into a `cliFlags` struct using the `flag.*Var` forms, then calls `flag.Parse()`.
44
+
*`flag.StringVar(&f.wordlistFile, "w", "", ...)`: Binds the wordlist file flag.
45
+
*`flag.IntVar(&f.concurrency, "t", 100, ...)`: Binds the concurrency level flag.
46
+
*`flag.IntVar(&f.timeoutMs, "timeout", 1000, ...)`: Binds the DNS timeout flag.
47
+
*`flag.StringVar(&f.dnsServer, "dns-server", DefaultDNSServer, ...)`: Binds the custom DNS server flag.
48
+
*`flag.BoolVar(&f.verbose, "v", false, ...)`: Binds the verbose flag.
49
+
*`flag.BoolVar(&f.showProgress, "progress", true, ...)`: Binds the progress reporting flag.
50
+
*`flag.BoolVar(&f.showVersion, "version", false, ...)`: Binds the version flag.
51
+
*`flag.StringVar(&f.outputFile, "o", "", ...)`: Binds the output file flag.
52
+
*`flag.IntVar(&f.attempts, "attempts", 0, ...)`: Binds the attempt count flag.
53
+
*`flag.IntVar(&f.retries, "retries", 0, ...)`: Binds the deprecated retry flag.
54
+
*`flag.BoolVar(&f.force, "force", false, ...)`: Binds the force flag.
55
+
*`flag.Parse()`: Parses the provided arguments into the `cliFlags` struct.
56
56
*`flag.Arg(0)`: Retrieves the positional argument (the target domain).
57
57
***Interactions**: The parsed values are used to configure the subsequent components, such as the Wordlist Processing and DNS Resolution Engine. Input validation is performed to ensure valid values for critical parameters like concurrency, timeout, DNS server format (validated via `validateDNSServer`), and domain syntax (validated via `validateDomain`).
* Configuration summary, per-query DNS resolution info, and final scan statistics — all via `Info` to stderr.
107
107
***Progress Reporting** (when `-progress` flag is enabled):
108
-
* A dedicated goroutine using a 2-second ticker calls `Progress` on stderr.
108
+
* A dedicated goroutine using a 1-second ticker calls `Progress` on stderr.
109
109
***Interactions**: All components route output through the `Writer`. Since results are the only thing on stdout, piping (`| cut -d' ' -f2`) works without `-progress=false`.
*`processedWords`: An atomic counter that's incremented each time a subdomain is checked.
118
118
*`foundSubdomains`: An atomic counter that's incremented each time a valid subdomain is found.
119
119
***Progress Display** (on stderr):
120
-
* A dedicated goroutine using a ticker (running every 2 seconds) calls `Writer.Progress`
120
+
* A dedicated goroutine using a ticker (running every 1 second) calls `Writer.Progress`
121
121
* Uses `\r` carriage return to update the same line repeatedly
122
122
* Shows percentage completion, processed count, and found count
123
123
***Interactions**: The Progress Monitoring component works alongside the worker goroutines, using atomic operations to safely track counts across multiple goroutines. Writing to stderr keeps stdout pipe-clean.
0 commit comments