Clean up everything

This commit is contained in:
perp 2024-07-09 18:00:24 +01:00
parent 5fd719131a
commit 4d584e2ee8
4 changed files with 27 additions and 31 deletions

View File

@ -5,14 +5,11 @@ Blink is a DNS bruteforcer made in Go
## This project is a work in progress ## This project is a work in progress
## Todo ## Usage
- [ ] Add ENT (empty non-terminal) support
- [ ] Add verifying host support
- [ ] Move half of main.go to /internal
## Help ### Help
``` ```
Blink is a DNS bruteforcer made in Go (Author: perp) Blink is a DNS bruteforcer made in Go
Usage: Usage:
blink [flags] blink [flags]
@ -22,13 +19,18 @@ Flags:
-r, --resolvers string Path to resolvers -r, --resolvers string Path to resolvers
-u, --udp Query using UDP -u, --udp Query using UDP
-i, --ipv6 Query for IPv6 -i, --ipv6 Query for IPv6
-c, --wildcard Query for wildcard -d, --wildcard Query for wildcard
-d, --timeout int Query timeout (default 5) -t, --timeout int Query timeout (default 5)
-t, --threads int Concurrent threads (default 1) -c, --threads int Concurrent threads (default 1)
-v, --debug Debug mode -v, --verbose Verbose logging
-h, --help help for blink -h, --help help for blink
``` ```
### Running
```
blink -w subdomains.txt -r resolvers.txt -d -c 50
```
## Credits ## Credits
Thanks to [aiodnsbrute](https://github.com/blark/aiodnsbrute) for the inspiration Thanks to [aiodnsbrute](https://github.com/blark/aiodnsbrute) for the inspiration

View File

@ -1,5 +0,0 @@
# Todo
- [ ] Clean up CLI
- [ ] Fix logger levels
- [ ] Complete all options (ENT, verify etc)

View File

@ -22,7 +22,6 @@ import (
const banner = `___ _ _ _ _ _ _ const banner = `___ _ _ _ _ _ _
|__] | | |\ | |_/ |__] | | |\ | |_/
|__] |___ | | \| | \_ |__] |___ | | \| | \_
` `
// Runner options // Runner options
@ -39,7 +38,7 @@ var (
// Command // Command
var rootCmd = &cobra.Command{ var rootCmd = &cobra.Command{
Use: "blink", Use: "blink",
Short: "Blink is a DNS bruteforcer made in Go (Author: perp)", Short: "Blink is a DNS bruteforcer made in Go",
Run: func(_ *cobra.Command, args []string) { Run: func(_ *cobra.Command, args []string) {
// Verbose enabled // Verbose enabled
if verbose { if verbose {
@ -66,7 +65,7 @@ var rootCmd = &cobra.Command{
} }
// Print banner // Print banner
color.Red(banner) fmt.Fprintln(os.Stderr, color.RedString(banner))
// Read wordlist path // Read wordlist path
wLines, err := file.Read(wordlist) wLines, err := file.Read(wordlist)
@ -82,10 +81,8 @@ var rootCmd = &cobra.Command{
os.Exit(1) os.Exit(1)
} }
// Sort & compact lines + append port // Compact lines + append port
slices.Sort(wLines)
opts.Wordlist = slices.Compact(wLines) opts.Wordlist = slices.Compact(wLines)
slices.Sort(rLines)
opts.Resolvers = slices.Compact(rLines) opts.Resolvers = slices.Compact(rLines)
rLines = util.Port(rLines) rLines = util.Port(rLines)

View File

@ -9,13 +9,15 @@ type Options struct {
Domains []string // Target domains Domains []string // Target domains
Wordlist []string // Target wordlist Wordlist []string // Target wordlist
Resolvers []string // Target resolvers Resolvers []string // Target resolvers
// ENT bool // Query for ENT
UDP bool // Query using UDP UDP bool // Query using UDP
IPv6 bool // Query for IPv6 IPv6 bool // Query for IPv6
// Verify bool // Verify query
Timeout int // Query timeout Timeout int // Query timeout
Threads int // Concurrent threads Threads int // Concurrent threads
OnResult OnResultFunc // Result handler OnResult OnResultFunc // Result handler
// Todo
// ENT bool // Query for ENT
// Verify bool // Verify query
} }
// Result handler function // Result handler function