domsniper 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/.env.example +40 -0
  2. package/LICENSE +21 -0
  3. package/README.md +246 -0
  4. package/package.json +72 -0
  5. package/src/app.tsx +2062 -0
  6. package/src/completions.ts +65 -0
  7. package/src/core/db.ts +1313 -0
  8. package/src/core/features/asn-lookup.ts +91 -0
  9. package/src/core/features/backlinks.ts +83 -0
  10. package/src/core/features/blacklist-check.ts +67 -0
  11. package/src/core/features/cert-transparency.ts +87 -0
  12. package/src/core/features/config.ts +81 -0
  13. package/src/core/features/cors-check.ts +90 -0
  14. package/src/core/features/dns-details.ts +27 -0
  15. package/src/core/features/domain-age.ts +33 -0
  16. package/src/core/features/domain-suggest.ts +87 -0
  17. package/src/core/features/drop-catch.ts +159 -0
  18. package/src/core/features/email-security.ts +112 -0
  19. package/src/core/features/expiring-feed.ts +160 -0
  20. package/src/core/features/export.ts +74 -0
  21. package/src/core/features/filter.ts +96 -0
  22. package/src/core/features/http-probe.ts +46 -0
  23. package/src/core/features/marketplace.ts +69 -0
  24. package/src/core/features/path-scanner.ts +123 -0
  25. package/src/core/features/port-scanner.ts +132 -0
  26. package/src/core/features/portfolio-bulk.ts +125 -0
  27. package/src/core/features/portfolio-monitor.ts +214 -0
  28. package/src/core/features/portfolio.ts +98 -0
  29. package/src/core/features/price-compare.ts +39 -0
  30. package/src/core/features/rdap.ts +128 -0
  31. package/src/core/features/reverse-ip.ts +73 -0
  32. package/src/core/features/s3-export.ts +99 -0
  33. package/src/core/features/scoring.ts +121 -0
  34. package/src/core/features/security-headers.ts +162 -0
  35. package/src/core/features/session.ts +74 -0
  36. package/src/core/features/snipe.ts +264 -0
  37. package/src/core/features/social-check.ts +81 -0
  38. package/src/core/features/ssl-check.ts +88 -0
  39. package/src/core/features/subdomain-discovery.ts +53 -0
  40. package/src/core/features/takeover-detect.ts +143 -0
  41. package/src/core/features/tech-stack.ts +135 -0
  42. package/src/core/features/tld-expand.ts +43 -0
  43. package/src/core/features/variations.ts +134 -0
  44. package/src/core/features/version-check.ts +58 -0
  45. package/src/core/features/waf-detect.ts +171 -0
  46. package/src/core/features/watch.ts +120 -0
  47. package/src/core/features/wayback.ts +64 -0
  48. package/src/core/features/webhooks.ts +126 -0
  49. package/src/core/features/whois-history.ts +99 -0
  50. package/src/core/features/zone-transfer.ts +75 -0
  51. package/src/core/index.ts +50 -0
  52. package/src/core/paths.ts +9 -0
  53. package/src/core/registrar.ts +413 -0
  54. package/src/core/theme.ts +140 -0
  55. package/src/core/types.ts +143 -0
  56. package/src/core/validate.ts +58 -0
  57. package/src/core/whois.ts +265 -0
  58. package/src/index.tsx +1888 -0
  59. package/src/market-client.ts +186 -0
  60. package/src/proxy/ca.ts +116 -0
  61. package/src/proxy/db.ts +175 -0
  62. package/src/proxy/server.ts +155 -0
  63. package/tsconfig.json +30 -0
package/.env.example ADDED
@@ -0,0 +1,40 @@
1
+ # Domain Sniper Configuration
2
+ # Copy to .env and fill in your values
3
+
4
+ # ─── Registrar API (for domain registration) ─────────────
5
+ # Provider: godaddy | namecheap | cloudflare
6
+ REGISTRAR_PROVIDER=godaddy
7
+ REGISTRAR_API_KEY=your-api-key-here
8
+ REGISTRAR_API_SECRET=your-api-secret-here
9
+
10
+ # Namecheap-specific
11
+ NAMECHEAP_USERNAME=your-username
12
+ CLIENT_IP=your-public-ip
13
+
14
+ # Cloudflare-specific
15
+ CLOUDFLARE_ACCOUNT_ID=your-account-id
16
+
17
+ # ─── Marketplace Server ──────────────────────────────────
18
+ BETTER_AUTH_SECRET=generate-a-32-char-secret-here-xxxxx
19
+ BETTER_AUTH_URL=http://localhost:3000
20
+ MARKET_PORT=3000
21
+
22
+ # ─── Marketplace ─────────────────────────────────────────
23
+ # Default marketplace server (change to self-hosted URL if needed)
24
+ MARKET_URL=http://localhost:3000
25
+
26
+ # ─── Notifications ───────────────────────────────────────
27
+ # Slack/Discord webhook for domain availability alerts
28
+ # WEBHOOK_URL=https://hooks.slack.com/services/...
29
+
30
+ # ─── S3/R2 Cloud Storage (optional — for report uploads) ──
31
+ # Works with AWS S3, Cloudflare R2, DigitalOcean Spaces, MinIO
32
+ # S3_BUCKET=domain-sniper-exports
33
+ # S3_ACCESS_KEY_ID=your-key
34
+ # S3_SECRET_ACCESS_KEY=your-secret
35
+ # S3_ENDPOINT=https://your-r2-account.r2.cloudflarestorage.com
36
+ # S3_REGION=auto
37
+
38
+ # ─── External APIs (optional) ────────────────────────────
39
+ # WhoisFreaks - expiring domains feed (free: 100 req/month)
40
+ # WHOISFREAKS_API_KEY=your-key-here
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andrew Adhikari
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.
package/README.md ADDED
@@ -0,0 +1,246 @@
1
+ # Domain Sniper
2
+
3
+ All-in-one domain intelligence toolkit -- WHOIS, DNS, security recon, portfolio management, and a self-hostable marketplace. Built with Bun and TypeScript.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ git clone https://github.com/yourusername/domain-sniper.git
9
+ cd domain-sniper
10
+ bun install
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ ```bash
16
+ # Interactive TUI -- scan domains, browse intel, manage portfolio
17
+ bun run start
18
+
19
+ # Headless check with JSON output (pipe to jq)
20
+ bun run start --headless --json example.com startup.io
21
+
22
+ # Full security recon on a target
23
+ bun run start recon example.com
24
+ ```
25
+
26
+ ## Features
27
+
28
+ ### Intelligence
29
+ - **WHOIS & RDAP** -- Registration info, expiry dates, registrar details
30
+ - **DNS Records** -- A, AAAA, MX, TXT, CNAME resolution
31
+ - **HTTP Probe** -- Status codes, redirects, parked domain detection
32
+ - **SSL Certificates** -- Issuer, expiry, SANs, protocol version
33
+ - **Domain Scoring** -- 0-100 based on length, TLD, readability, brandability
34
+ - **Wayback Machine** -- Archive history and snapshot count
35
+ - **Social Media** -- Username availability across 12 platforms
36
+ - **Tech Stack** -- Detect 40+ technologies (CMS, frameworks, CDN, analytics)
37
+ - **Backlink Estimation** -- PageRank and CommonCrawl page count
38
+ - **Domain Suggestions** -- Generate name ideas from keywords
39
+ - **TLD Expansion** -- Check a name across all major TLDs
40
+ - **Variations** -- Typos, plurals, prefixes, suffixes
41
+
42
+ ### Security Recon
43
+ - **Port Scanner** -- TCP connect scan on 20 common ports with banner grabbing
44
+ - **Security Headers** -- HSTS, CSP, X-Frame-Options audit (A+ to F grading)
45
+ - **Email Security** -- SPF, DKIM, DMARC analysis
46
+ - **WAF Detection** -- Identify 10 firewalls (Cloudflare, AWS, Akamai, etc.)
47
+ - **Blacklist Check** -- Query 8 DNS blocklists for reputation
48
+ - **Sensitive Paths** -- Scan 37 paths for exposed .env, .git, admin panels
49
+ - **CORS Check** -- Test 6 attack vectors for misconfigurations
50
+ - **Certificate Transparency** -- Subdomain discovery via crt.sh
51
+ - **Subdomain Takeover** -- Dangling CNAME detection (16 services)
52
+ - **DNS Zone Transfer** -- AXFR vulnerability check
53
+ - **Reverse IP** -- Discover co-hosted domains
54
+ - **ASN/Geolocation** -- Network, ISP, and location info
55
+
56
+ ### Portfolio Management
57
+ - Track owned domains with purchase price, renewal dates, registrar
58
+ - Financial tracking -- P&L, transactions, valuations, ROI
59
+ - Renewal calendar with 90/60/30/7 day alerts
60
+ - Health monitoring -- WHOIS, DNS, HTTP, SSL checks
61
+ - Categories, tags, acquisition pipeline
62
+ - CSV export for portfolio, transactions, and tax reporting
63
+
64
+ ### Automation
65
+ - **Watch Mode** -- Hourly monitoring of tagged domains
66
+ - **Drop Catching** -- High-frequency polling for expiring domains
67
+ - **Snipe Engine** -- Auto-register domains the moment they become available
68
+ - **Webhooks** -- Slack, Discord, and email notifications
69
+ - **Expiring Feed** -- Browse domains about to drop
70
+
71
+ ## TUI Keyboard Shortcuts
72
+
73
+ | Key | Action |
74
+ |-----|--------|
75
+ | `/` or `i` | Enter domains to scan |
76
+ | `f` | Load domains from file |
77
+ | `e` | TLD expansion |
78
+ | `v` | Generate variations |
79
+ | `d` | Suggest similar names |
80
+ | `Space` | Tag/untag domain |
81
+ | `r` | Register domain |
82
+ | `R` | Bulk register (two-step confirm) |
83
+ | `Tab` | Cycle intel tabs |
84
+ | `n` | Toggle recon mode |
85
+ | `s` | Cycle status filter |
86
+ | `o` / `O` | Cycle sort / toggle order |
87
+ | `p` | Add to portfolio |
88
+ | `P` | Portfolio dashboard |
89
+ | `M` | Marketplace |
90
+ | `w` | Watch tagged domains |
91
+ | `D` | Drop catch (expired) |
92
+ | `h` | Scan history |
93
+ | `c` | Clear cache |
94
+ | `x` | Export CSV/JSON |
95
+ | `Ctrl+S` | Save session |
96
+ | `Ctrl+L` | Load session |
97
+ | `?` | Help |
98
+ | `q` | Quit |
99
+
100
+ ## CLI Commands
101
+
102
+ | Command | Description |
103
+ |---------|-------------|
104
+ | `domain-sniper` | Interactive TUI mode |
105
+ | `domain-sniper example.com --headless` | Quick check |
106
+ | `domain-sniper --headless --json example.com` | JSON output |
107
+ | `domain-sniper recon example.com` | Full security recon |
108
+ | `domain-sniper suggest startup` | Generate domain name ideas |
109
+ | `domain-sniper portfolio --dashboard` | Portfolio overview |
110
+ | `domain-sniper portfolio --health` | Run health checks |
111
+ | `domain-sniper portfolio --pnl` | Profit & loss report |
112
+ | `domain-sniper portfolio --renewals` | Renewal calendar |
113
+ | `domain-sniper portfolio --export-csv domains.csv` | Export portfolio |
114
+ | `domain-sniper expiring --tld com` | Browse expiring domains |
115
+ | `domain-sniper dropcatch example.com` | Auto-snipe dropping domain |
116
+ | `domain-sniper market browse` | Browse marketplace |
117
+ | `domain-sniper market list example.com -p 500` | List for sale |
118
+ | `domain-sniper proxy start` | Start HTTP intercept proxy |
119
+ | `domain-sniper snipe add example.com` | Add snipe target |
120
+ | `domain-sniper db --stats` | Database statistics |
121
+ | `domain-sniper config --show` | View configuration |
122
+ | `domain-sniper completions zsh` | Shell completions |
123
+
124
+ ## Marketplace
125
+
126
+ A self-hostable domain marketplace with authentication, listings, offers, messaging, and domain ownership verification.
127
+
128
+ ```bash
129
+ # Start the marketplace server
130
+ bun run serve
131
+
132
+ # Browse from CLI
133
+ domain-sniper market browse
134
+
135
+ # List a domain for sale
136
+ domain-sniper market list mydomain.com --price 500
137
+ ```
138
+
139
+ See [marketplace/README.md](marketplace/README.md) for full API documentation, verification methods, and self-hosting instructions.
140
+
141
+ ## HTTP Proxy
142
+
143
+ Intercept and inspect HTTP/HTTPS traffic for domain intelligence gathering.
144
+
145
+ ```bash
146
+ # Start the proxy
147
+ domain-sniper proxy start
148
+
149
+ # Start with custom port
150
+ domain-sniper proxy start --port 8888
151
+ ```
152
+
153
+ The proxy generates a local CA certificate at `~/.domain-sniper/ca/`. Install it in your browser to inspect HTTPS traffic.
154
+
155
+ ## Snipe Engine
156
+
157
+ Automatically register domains the moment they become available.
158
+
159
+ ```bash
160
+ # Add a domain to watch
161
+ domain-sniper snipe add example.com
162
+
163
+ # List active snipes
164
+ domain-sniper snipe list
165
+
166
+ # Remove a snipe
167
+ domain-sniper snipe remove example.com
168
+ ```
169
+
170
+ Requires a registrar API key configured in `.env`.
171
+
172
+ ## Configuration
173
+
174
+ Copy `.env.example` to `.env` and configure:
175
+
176
+ ```bash
177
+ cp .env.example .env
178
+ ```
179
+
180
+ ### Registrar API (for domain registration)
181
+ - GoDaddy, Namecheap, or Cloudflare
182
+ - Set `REGISTRAR_PROVIDER`, `REGISTRAR_API_KEY`, `REGISTRAR_API_SECRET`
183
+
184
+ ### Marketplace
185
+ - Set `BETTER_AUTH_SECRET` (min 32 chars) for auth
186
+ - Set `BETTER_AUTH_URL` for server URL
187
+ - Set `MARKET_URL` to point CLI at your marketplace instance
188
+
189
+ ### Persistent config
190
+ ```bash
191
+ domain-sniper config --set concurrency=10
192
+ domain-sniper config --set notifications.webhookUrl=https://hooks.slack.com/...
193
+ ```
194
+
195
+ ## Self-Hosting the Marketplace
196
+
197
+ 1. Clone the repo
198
+ 2. Set `BETTER_AUTH_SECRET` and `BETTER_AUTH_URL` in `.env`
199
+ 3. Run `bun run serve`
200
+ 4. Point CLI clients to your server: `domain-sniper market login --server https://your-server.com`
201
+
202
+ For production, consider PostgreSQL, rate limiting, and TLS. See [marketplace/README.md](marketplace/README.md).
203
+
204
+ ## Architecture
205
+
206
+ ```
207
+ src/core/ Portable business logic (40+ modules)
208
+ src/proxy/ HTTP/HTTPS interceptor
209
+ src/app.tsx TUI (React + @opentui)
210
+ src/index.tsx CLI (Commander)
211
+ src/market-client.ts Marketplace API client
212
+ marketplace/ Self-hostable marketplace server
213
+ ```
214
+
215
+ See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the full breakdown.
216
+
217
+ ## Security
218
+
219
+ - Registrar API keys never leave your machine
220
+ - All inputs validated, all queries parameterized
221
+ - Shell commands use `execFile` (no injection)
222
+ - File paths confined to allowed directories
223
+
224
+ See [docs/SECURITY.md](docs/SECURITY.md) for the full security model.
225
+
226
+ ## Tech Stack
227
+
228
+ - **Runtime:** Bun
229
+ - **Language:** TypeScript (strict mode)
230
+ - **TUI:** @opentui/react
231
+ - **Database:** SQLite (bun:sqlite)
232
+ - **Auth:** Better Auth
233
+ - **Tests:** bun:test
234
+
235
+ ## Contributing
236
+
237
+ 1. Fork the repo
238
+ 2. Create a feature branch: `git checkout -b feat/my-feature`
239
+ 3. Write tests first, then implement
240
+ 4. Ensure `bunx tsc --noEmit` passes
241
+ 5. Ensure `bun test` passes
242
+ 6. Submit a pull request
243
+
244
+ ## License
245
+
246
+ MIT -- see [LICENSE](LICENSE).
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "domsniper",
3
+ "version": "0.1.0",
4
+ "description": "All-in-one domain intelligence toolkit — availability checker, security recon, portfolio manager. Built with Bun.",
5
+ "module": "src/index.tsx",
6
+ "type": "module",
7
+ "private": false,
8
+ "bin": {
9
+ "domsniper": "./src/index.tsx",
10
+ "domain-sniper": "./src/index.tsx"
11
+ },
12
+ "files": [
13
+ "src/",
14
+ "README.md",
15
+ "LICENSE",
16
+ ".env.example",
17
+ "tsconfig.json"
18
+ ],
19
+ "scripts": {
20
+ "start": "bun run src/index.tsx",
21
+ "dev": "bun run --watch src/index.tsx",
22
+ "headless": "bun run src/index.tsx --headless",
23
+ "test": "bun test",
24
+ "typecheck": "bunx tsc --noEmit",
25
+ "build": "bun build src/index.tsx --compile --outfile dsniper",
26
+ "build:linux": "bun build src/index.tsx --compile --target=bun-linux-x64 --outfile dsniper-linux",
27
+ "build:mac": "bun build src/index.tsx --compile --target=bun-darwin-arm64 --outfile dsniper-mac",
28
+ "build:win": "bun build src/index.tsx --compile --target=bun-windows-x64 --outfile dsniper.exe",
29
+ "prepublishOnly": "bun test && bunx tsc --noEmit"
30
+ },
31
+ "keywords": [
32
+ "domain",
33
+ "whois",
34
+ "dns",
35
+ "security",
36
+ "recon",
37
+ "pentest",
38
+ "portfolio",
39
+ "tui",
40
+ "cli",
41
+ "bun",
42
+ "nmap",
43
+ "osint"
44
+ ],
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/t-rhex/domain-sniper.git"
48
+ },
49
+ "homepage": "https://github.com/t-rhex/domain-sniper#readme",
50
+ "bugs": {
51
+ "url": "https://github.com/t-rhex/domain-sniper/issues"
52
+ },
53
+ "author": "Andrew Adhikari",
54
+ "license": "MIT",
55
+ "engines": {
56
+ "bun": ">=1.0.0"
57
+ },
58
+ "devDependencies": {
59
+ "@types/bun": "latest"
60
+ },
61
+ "peerDependencies": {
62
+ "typescript": "^5"
63
+ },
64
+ "dependencies": {
65
+ "@opentui/core": "^0.1.96",
66
+ "@opentui/react": "^0.1.96",
67
+ "@types/react": "^19.2.14",
68
+ "chalk": "^5.6.2",
69
+ "commander": "^14.0.3",
70
+ "whois-json": "^2.0.4"
71
+ }
72
+ }