diff --git a/Plugins/webtitle.go b/Plugins/webtitle.go
index 991f1b9..0f719ff 100644
--- a/Plugins/webtitle.go
+++ b/Plugins/webtitle.go
@@ -189,7 +189,7 @@ func getRespBody(oResp *http.Response) ([]byte, error) {
}
func gettitle(body []byte) (title string) {
- re := regexp.MustCompile("(?ims)
(.*)")
+ re := regexp.MustCompile("(?ims)(.*?)")
find := re.FindSubmatch(body)
if len(find) > 1 {
title = string(find[1])
@@ -217,7 +217,7 @@ func GetProtocol(host string, Timeout int64) (protocol string) {
return
}
- socksconn, err := common.WrapperTcpWithTimeout("tcp", host, time.Duration(Timeout) * time.Second)
+ socksconn, err := common.WrapperTcpWithTimeout("tcp", host, time.Duration(Timeout)*time.Second)
if err != nil {
return
}
diff --git a/common/Parse.go b/common/Parse.go
index 526e747..efe1f81 100644
--- a/common/Parse.go
+++ b/common/Parse.go
@@ -164,29 +164,27 @@ func ParseScantype(Info *HostInfo) {
if !ok {
showmode()
}
- if Info.Scantype != "all" {
- if Info.Ports == DefaultPorts {
- switch Info.Scantype {
- case "rdp":
- Info.Ports = "3389"
- case "web":
- Info.Ports = Webport
- case "webonly":
- Info.Ports = Webport
- case "ms17010":
- Info.Ports = "445"
- case "cve20200796":
- Info.Ports = "445"
- case "portscan":
- Info.Ports = DefaultPorts + "," + Webport
- case "main":
- Info.Ports = DefaultPorts
- default:
- port, _ := PORTList[Info.Scantype]
- Info.Ports = strconv.Itoa(port)
- }
- fmt.Println("-m ", Info.Scantype, " start scan the port:", Info.Ports)
+ if Info.Scantype != "all" && Info.Ports == DefaultPorts+","+Webport {
+ switch Info.Scantype {
+ case "rdp":
+ Info.Ports = "3389"
+ case "web":
+ Info.Ports = Webport
+ case "webonly":
+ Info.Ports = Webport
+ case "ms17010":
+ Info.Ports = "445"
+ case "cve20200796":
+ Info.Ports = "445"
+ case "portscan":
+ Info.Ports = DefaultPorts + "," + Webport
+ case "main":
+ Info.Ports = DefaultPorts
+ default:
+ port, _ := PORTList[Info.Scantype]
+ Info.Ports = strconv.Itoa(port)
}
+ fmt.Println("-m ", Info.Scantype, " start scan the port:", Info.Ports)
}
}