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
- Updated .golangci.yml to version 2 and re-enabled gofmt formatter.
- Removed deprecated linter exclusions for test files and added exclusions for gosec.
- Simplified docker-compose.yml by removing the version declaration.
- Enhanced Dockerfile to include the internal directory for better organization.
- Added .gitattributes for line-ending normalization.
- Revised README.md to reflect the new project structure and features.
- Updated documentation to clarify the use of the -attempts flag for DNS resolution.
- Improved CODE_OF_CONDUCT.md with detailed community guidelines.
- Adjusted CONTRIBUTING.md to link to the Code of Conduct.
- Enhanced DEVELOPER_GUIDE.md with a comprehensive project structure overview.
*`d.DialContext(ctx, "udp", dnsServer)`: Establishes a UDP connection to the configured DNS server.
74
74
*`resolver.LookupHost(timeoutCtx, domain)`: Performs the DNS lookup for the given domain. The context is derived from the caller via `context.WithTimeout(ctx, timeout)`, so both the per-query timeout and SIGINT cancellation are respected. It attempts to find A or AAAA records for the host.
75
75
* The function returns `true` if `LookupHost` returns no error (i.e., the domain resolved), and `false` otherwise.
76
-
***Interactions**: Workers call `resolveDomainWithRetry`, which delegates to `resolveDomain` with retry logic. It takes a fully qualified domain name, timeout duration, DNS server address, verbose flag, and retry count as input. It outputs a boolean indicating whether the domain resolved successfully. The result is used to decide if the domain should be printed to the console and/or written to the output file.
76
+
***Interactions**: Workers call `dns.ResolveDomainWithRetry`, which delegates to `dns.ResolveDomain` with retry logic. It takes a fully qualified domain name, timeout duration, DNS server address, verbose flag, and retry count as input. It outputs a boolean indicating whether the domain resolved successfully. The result is used to decide if the domain should be printed to the console and/or written to the output file.
*`wg.Add(1)`: Increments the `WaitGroup` counter for each worker started.
86
86
*`go func() { ... }()`: Each worker runs in its own goroutine.
87
87
*`defer wg.Done()`: Decrements the `WaitGroup` counter when the goroutine exits.
88
-
*`for subdomainPrefix := range subdomains { ... }`: Each worker continuously reads subdomain prefixes from the `subdomains` channel until the channel is closed. For each prefix, it constructs the full domain and calls `resolveDomain()`.
88
+
*`for subdomainPrefix := range subdomains { ... }`: Each worker continuously reads subdomain prefixes from the `subdomains` channel until the channel is closed. For each prefix, it constructs the full domain and calls `dns.ResolveDomainWithRetry()`.
89
89
***Closing the Channel (`close(subdomains)`)**: After all subdomain prefixes from the wordlist have been sent to the `subdomains` channel, the channel is closed. This signals to the worker goroutines that no more work will be added.
90
90
***Waiting for Completion (`wg.Wait()`)**: The main goroutine blocks until all worker goroutines have called `wg.Done()`, ensuring all lookups are finished.
91
91
***Interactions**: This component orchestrates the parallel execution of DNS lookups. It receives subdomain prefixes from the Wordlist Processing component (via the `subdomains` channel) and utilizes the DNS Resolution Engine within each worker goroutine. The number of workers is controlled by the Argument Parsing component.
@@ -131,12 +131,12 @@ The flow of data through the `subenum` application can be summarized as follows:
131
131
5.**Work Distribution**: The `subdomains` channel acts as a queue for the **Concurrency Management (Worker Pool)** component.
132
132
* Worker goroutines (number determined by the `-t` flag) pick up these prefixes from the channel.
133
133
6.**Subdomain Construction**: Each worker goroutine takes a `subdomainPrefix` and concatenates it with the `targetDomain` (e.g., `subdomainPrefix + "." + targetDomain`) to form a `fullDomain` string.
134
-
7.**DNS Lookup**: The `fullDomain` string, the `timeout` value, and the DNS server are passed to the `resolveDomain` function within the **DNS Resolution Engine**.
135
-
*The `resolveDomain` function attempts to resolve the `fullDomain`.
134
+
7.**DNS Lookup**: The `fullDomain` string, the `timeout` value, and the DNS server are passed to `dns.ResolveDomainWithRetry` within the **DNS Resolution Engine**.
135
+
*`dns.ResolveDomain` attempts to resolve the `fullDomain`.
136
136
* It returns `true` if the domain resolves successfully, `false` otherwise.
137
137
* If verbose mode is enabled, it also prints detailed information about the resolution attempt.
138
138
8.**Output Generation**:
139
-
* If `resolveDomain` returns `true`, the worker goroutine uses the **Output Formatting** component to print the `fullDomain` to the standard output.
139
+
* If the resolution returns `true`, the worker goroutine uses the **Output Formatting** component to print the `fullDomain` to the standard output.
140
140
* The atomic counter for found subdomains is incremented.
141
141
9.**Progress Tracking**: After each DNS lookup:
142
142
* The atomic counter for processed entries is incremented.
*(A standard Code of Conduct, like the Contributor Covenant, will be added here.)*
6
+
# Contributor Covenant Code of Conduct
4
7
5
-
Our Pledge
8
+
## Our Pledge
9
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone.
6
10
7
-
In the interest of fostering an open and welcoming environment, we as
8
-
contributors and maintainers pledge to making participation in our project and
9
-
our community a harassment-free experience for everyone, regardless of age, body
10
-
size, disability, ethnicity, sex characteristics, gender identity and expression,
11
-
level of experience, education, socio-economic status, nationality, personal
12
-
appearance, race, religion, or sexual identity and orientation.
11
+
## Our Standards
12
+
Examples of behavior that contributes to a positive environment:
13
+
- Using welcoming and inclusive language
14
+
- Being respectful of differing viewpoints and experiences
15
+
- Gracefully accepting constructive criticism
16
+
- Focusing on what is best for the community
17
+
18
+
Examples of unacceptable behavior:
19
+
- Harassment, trolling, or insulting comments
20
+
- Public or private harassment
21
+
- Publishing others' private information without permission
22
+
- Other conduct which could reasonably be considered inappropriate
23
+
24
+
## Enforcement
25
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening a [Security Advisory](https://github.com/TMHSDigital/subenum/security/advisories/new) or contacting the maintainers privately.
26
+
27
+
## Attribution
28
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
0 commit comments