refactor(discovery): use ping for discovery and fill MAC via SSH
This commit is contained in:
@@ -27,8 +27,9 @@ type Config struct {
|
||||
|
||||
// ScanConfig 网段扫描
|
||||
type ScanConfig struct {
|
||||
CIDR string `yaml:"cidr"`
|
||||
Timeout time.Duration `yaml:"timeout"`
|
||||
CIDR string `yaml:"cidr"`
|
||||
Timeout time.Duration `yaml:"timeout"`
|
||||
Concurrency int `yaml:"concurrency"` // 并发探测数,默认 30
|
||||
}
|
||||
|
||||
// SSHConfig SSH 认证
|
||||
@@ -73,8 +74,9 @@ type WorkflowConfig struct {
|
||||
func Default() *Config {
|
||||
return &Config{
|
||||
Scan: ScanConfig{
|
||||
CIDR: "192.168.1.0/24",
|
||||
Timeout: 3 * time.Second,
|
||||
CIDR: "192.168.1.0/24",
|
||||
Timeout: 3 * time.Second,
|
||||
Concurrency: 30,
|
||||
},
|
||||
SSH: SSHConfig{
|
||||
User: "root",
|
||||
|
||||
Reference in New Issue
Block a user