Skip to content

Commit f5d65b9

Browse files
committed
Add initial implementation of subenum tool with Docker support, wordlist generation, and comprehensive documentation. Includes .gitignore, Dockerfile, and example scripts for usage.
1 parent 39f2fcb commit f5d65b9

32 files changed

+2659
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve subenum
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Command executed: `./subenum ...`
16+
2. Wordlist content or size: ...
17+
3. Target domain: ... (please use example.com for privacy reasons unless the issue is domain-specific)
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots/Output**
24+
If applicable, add screenshots or copy the terminal output to help explain your problem.
25+
26+
**Environment (please complete the following information):**
27+
- OS: [e.g. Ubuntu 22.04, Windows 11, macOS 13.0]
28+
- Go Version: [e.g. 1.22.0]
29+
- subenum Version: [e.g. 0.2.0]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
33+
34+
**IMPORTANT: Do NOT include sensitive information, unauthorized scan results, or private domain details that you don't have permission to disclose.**
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for subenum
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Example: "I'm always frustrated when [...]"
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Use case**
20+
Explain the ethical and legitimate security testing scenarios where this feature would be beneficial.
21+
22+
**Implementation ideas (optional)**
23+
If you have thoughts on how to implement this feature, please share them here.
24+
25+
**Additional context**
26+
Add any other context or screenshots about the feature request here.
27+
28+
**IMPORTANT NOTE: Features should align with the educational and legitimate security testing purposes of this tool. Suggestions that could primarily enable malicious use may be rejected.**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## Description
2+
<!-- Brief description of the changes introduced by this PR -->
3+
4+
## Related Issue
5+
<!-- Link to the related issue (if applicable): #123 -->
6+
7+
## Type of Change
8+
<!-- Please mark the relevant option with an 'x' -->
9+
- [ ] Bug fix (non-breaking change which fixes an issue)
10+
- [ ] New feature (non-breaking change which adds functionality)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] Documentation update
13+
- [ ] Refactoring (no functional changes)
14+
- [ ] Performance improvements
15+
- [ ] Test updates
16+
17+
## Checklist
18+
<!-- Please mark the relevant option with an 'x' -->
19+
- [ ] I have read the [CONTRIBUTING](../docs/CONTRIBUTING.md) document
20+
- [ ] My code follows the code style of this project
21+
- [ ] I have added/updated appropriate comments to the code
22+
- [ ] I have added tests that prove my fix is effective or that my feature works
23+
- [ ] New and existing unit tests pass locally with my changes
24+
- [ ] I have updated the documentation accordingly (if applicable)
25+
26+
## Ethical Considerations
27+
<!-- Please confirm the following by marking with an 'x' -->
28+
- [ ] This change maintains or improves the security controls in the tool
29+
- [ ] This change follows the educational/legitimate security testing focus of the project
30+
- [ ] I have considered potential misuse cases and taken appropriate steps to prevent them
31+
32+
## Additional Information
33+
<!-- Any additional information or context that would be helpful for the reviewers -->

.github/workflows/go.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v4
18+
with:
19+
go-version: '1.22'
20+
cache: true
21+
22+
- name: Verify dependencies
23+
run: go mod verify
24+
25+
- name: Build
26+
run: go build -v -buildvcs=false ./...
27+
28+
- name: Test
29+
run: go test -v ./...
30+
31+
- name: Run golangci-lint
32+
uses: golangci/golangci-lint-action@v3
33+
with:
34+
version: latest
35+
36+
# Create a job for each OS (Windows, macOS, Linux)
37+
release:
38+
needs: build
39+
if: startsWith(github.ref, 'refs/tags/v')
40+
strategy:
41+
matrix:
42+
os: [ubuntu-latest, windows-latest, macos-latest]
43+
include:
44+
- os: ubuntu-latest
45+
artifact_name: subenum
46+
asset_name: subenum-linux-amd64
47+
- os: windows-latest
48+
artifact_name: subenum.exe
49+
asset_name: subenum-windows-amd64.exe
50+
- os: macos-latest
51+
artifact_name: subenum
52+
asset_name: subenum-macos-amd64
53+
54+
runs-on: ${{ matrix.os }}
55+
56+
steps:
57+
- uses: actions/checkout@v3
58+
59+
- name: Set up Go
60+
uses: actions/setup-go@v4
61+
with:
62+
go-version: '1.22'
63+
cache: true
64+
65+
- name: Build
66+
run: go build -v -buildvcs=false -o ${{ matrix.artifact_name }}
67+
68+
- name: Upload binaries to release
69+
uses: softprops/action-gh-release@v1
70+
with:
71+
files: ${{ matrix.artifact_name }}
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pages.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
# Allows running this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: true
20+
21+
jobs:
22+
# Build job
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
- name: Setup Pages
29+
uses: actions/configure-pages@v3
30+
- name: Build with Jekyll
31+
uses: actions/jekyll-build-pages@v1
32+
with:
33+
source: ./docs
34+
destination: ./_site
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v1
37+
38+
# Deployment job
39+
deploy:
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
runs-on: ubuntu-latest
44+
needs: build
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v2

.gitignore

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
subenum
8+
9+
# Test binary, built with `go test -c`
10+
*.test
11+
12+
# Output of the go coverage tool
13+
*.out
14+
15+
# Dependency directories (remove the comment below if you're not using Go modules)
16+
# vendor/
17+
18+
# Go workspace file
19+
go.work
20+
21+
# Output directories from the tool
22+
examples/results_*
23+
24+
# IDE and editor specific files
25+
.idea/
26+
.vscode/
27+
*.swp
28+
*.swo
29+
*~
30+
31+
# Logs
32+
*.log
33+
34+
# OS specific
35+
.DS_Store
36+
Thumbs.db

Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
FROM golang:1.22-alpine AS builder
2+
3+
WORKDIR /app
4+
5+
# Copy go.mod and go.sum first to leverage Docker cache
6+
COPY go.mod ./
7+
8+
# Copy source code
9+
COPY main.go ./
10+
COPY main_test.go ./
11+
12+
# Build the binary with optimizations
13+
RUN CGO_ENABLED=0 GOOS=linux go build -o subenum -ldflags="-w -s" .
14+
15+
# Use a minimal alpine image for the final container
16+
FROM alpine:latest
17+
18+
RUN apk --no-cache add ca-certificates
19+
20+
WORKDIR /root/
21+
22+
# Copy binary from builder stage
23+
COPY --from=builder /app/subenum .
24+
25+
# Copy examples directory with wordlists
26+
COPY examples/ ./examples/
27+
28+
# Create volume mount point for custom wordlists and output
29+
VOLUME ["/data"]
30+
31+
ENTRYPOINT ["./subenum"]
32+
33+
# Default command - shows help
34+
CMD ["-version"]
35+
36+
LABEL org.opencontainers.image.title="subenum"
37+
LABEL org.opencontainers.image.description="A Go-based CLI tool for subdomain enumeration"
38+
LABEL org.opencontainers.image.source="https://github.com/yourusername/subenum"
39+
LABEL org.opencontainers.image.licenses="MIT"
40+
LABEL org.opencontainers.image.documentation="https://github.com/yourusername/subenum/blob/main/README.md"
41+
LABEL org.opencontainers.image.vendor="Educational Use Only"
42+
LABEL org.opencontainers.image.usage="For educational and legitimate security testing purposes only"

LICENSE

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
MIT License
2+
3+
Copyright (c) 2025 TM Hospitality Strategies
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
23+
PROHIBITED USE: This software is provided for educational and legitimate security testing purposes only. The software must NOT be used for malicious or illegal purposes, including but not limited to unauthorized access to systems, data theft, disruption of services, or any activity prohibited by applicable local, national, or international laws. Users must ensure they have proper authorization before conducting security tests on any systems or networks. The authors and copyright holders explicitly prohibit any use of this software to cause harm or damage.

0 commit comments

Comments
 (0)