Skip to content

Commit

Permalink
[*]修复-eP参数存在的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lcvvvv committed Dec 19, 2022
1 parent 3be7ed1 commit de9ce95
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/type-config.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,19 @@ func (c *Config) loadExcludedPort() {
return
}

availablePort := make([]int, len(c.Port))
copy(availablePort, c.Port)
var availablePort = misc.CopySlice(c.Port)
var ignoredPort []int

for i, p := range c.Port {
for _, ep := range Args.ExcludedPort {
if p == ep {
var l int = len(ignoredPort)
var l = len(ignoredPort)
availablePort = append(availablePort[:i-l], availablePort[i-l+1:]...)
ignoredPort = append(ignoredPort, p)
break
}
}
}

c.Port = availablePort
slog.Println(slog.WARN, "本次扫描用户屏蔽的端口:", ignoredPort)
}
Expand Down

0 comments on commit de9ce95

Please sign in to comment.