优化ip解析模块

This commit is contained in:
影舞者
2021-12-01 15:22:48 +08:00
parent e49e6dd433
commit 4a34745091
21 changed files with 125 additions and 122 deletions
+6 -2
View File
@@ -118,7 +118,7 @@ func ParseInput(Info *HostInfo) {
IsSave = false
}
if Info.Ports == DefaultPorts {
Info.Ports += Webport
Info.Ports += "," + Webport
}
}
@@ -130,14 +130,18 @@ func ParseScantype(Info *HostInfo) {
if Info.Scantype != "all" {
if Info.Ports == DefaultPorts {
switch Info.Scantype {
case "wmi":
Info.Ports = "135"
case "web":
Info.Ports = Webport
case "ms17010":
Info.Ports = "445"
case "cve20200796":
Info.Ports = "445"
case "smb2":
Info.Ports = "445"
case "portscan":
Info.Ports = DefaultPorts
Info.Ports = DefaultPorts + "," + Webport
case "main":
Info.Ports = DefaultPorts
default: