This commit is contained in:
影舞者
2022-06-13 10:27:23 +08:00
parent a2573e10bb
commit fdffb369c9
2 changed files with 22 additions and 24 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ func getRespBody(oResp *http.Response) ([]byte, error) {
} }
func gettitle(body []byte) (title string) { func gettitle(body []byte) (title string) {
re := regexp.MustCompile("(?ims)<title>(.*)</title>") re := regexp.MustCompile("(?ims)<title>(.*?)</title>")
find := re.FindSubmatch(body) find := re.FindSubmatch(body)
if len(find) > 1 { if len(find) > 1 {
title = string(find[1]) title = string(find[1])
+1 -3
View File
@@ -164,8 +164,7 @@ func ParseScantype(Info *HostInfo) {
if !ok { if !ok {
showmode() showmode()
} }
if Info.Scantype != "all" { if Info.Scantype != "all" && Info.Ports == DefaultPorts+","+Webport {
if Info.Ports == DefaultPorts {
switch Info.Scantype { switch Info.Scantype {
case "rdp": case "rdp":
Info.Ports = "3389" Info.Ports = "3389"
@@ -188,7 +187,6 @@ func ParseScantype(Info *HostInfo) {
fmt.Println("-m ", Info.Scantype, " start scan the port:", Info.Ports) fmt.Println("-m ", Info.Scantype, " start scan the port:", Info.Ports)
} }
} }
}
func CheckErr(text string, err error, flag bool) { func CheckErr(text string, err error, flag bool) {
if err != nil { if err != nil {