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
As you can see, the usage is straightforward: fill in the `options` struct and call the runner to start. The key is knowing what to put in each option field.
60
+
61
+
Options struct definition:
60
62
```go
61
63
typeOptionsstruct {
62
-
Rateint64//每秒发包速率
63
-
Domain io.Reader//域名输入
64
-
DomainTotalint//扫描域名总数
65
-
Resolvers []string//dns resolvers
66
-
Silentbool//安静模式
67
-
TimeOutint//超时时间 单位(秒)
68
-
Retryint//最大重试次数
69
-
Methodstring//verify模式 enum模式 test模式
70
-
DnsTypestring//dns类型 a ns aaaa
71
-
Writer []outputter.Output//输出结构
64
+
Rateint64//Packet send rate per second
65
+
Domain io.Reader//Domain input
66
+
DomainTotalint//Total number of domains to scan
67
+
Resolvers []string//DNS resolvers
68
+
Silentbool//Silent mode
69
+
TimeOutint//Timeout in seconds
70
+
Retryint//Maximum retry count
71
+
Methodstring//verify mode / enum mode / test mode
72
+
DnsTypestring//DNS record type: a, ns, aaaa
73
+
Writer []outputter.Output//Output handlers
72
74
ProcessBar processbar.ProcessBar
73
-
EtherInfo *device.EtherTable//网卡信息
75
+
EtherInfo *device.EtherTable//Network adapter info
1. The underlying interface of ksubdomain is just a DNS validator. If you want to enumerate subdomains from a root domain, you need to put all the full domain names into the `Domain` field. See how the enum command does it in `cmd/ksubdomain/enum.go`.
80
+
2. The `Writer` field is an `outputter.Output` interface that defines how DNS responses are handled. ksubdomain ships with three built-in implementations in `runner/outputter/output`: store data in memory, write data to a file, and print data to the screen. You can implement this interface yourself for custom behavior.
81
+
3. The `ProcessBar` field is a `processbar.ProcessBar` interface. Its purpose is to expose internal statistics—success count, sent count, queue length, received count, failed count, and elapsed time—to the caller in real time.
82
+
4.`EtherInfo` is of type `*device.EtherTable` and is used to obtain network adapter information. You can usually just call `options.GetDeviceConfig()` to auto-detect the adapter configuration.
0 commit comments