mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-07-16 22:32:35 +08:00
update
This commit is contained in:
parent
a2573e10bb
commit
fdffb369c9
@ -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])
|
||||||
@ -217,7 +217,7 @@ func GetProtocol(host string, Timeout int64) (protocol string) {
|
|||||||
return
|
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 {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -164,29 +164,27 @@ 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"
|
case "web":
|
||||||
case "web":
|
Info.Ports = Webport
|
||||||
Info.Ports = Webport
|
case "webonly":
|
||||||
case "webonly":
|
Info.Ports = Webport
|
||||||
Info.Ports = Webport
|
case "ms17010":
|
||||||
case "ms17010":
|
Info.Ports = "445"
|
||||||
Info.Ports = "445"
|
case "cve20200796":
|
||||||
case "cve20200796":
|
Info.Ports = "445"
|
||||||
Info.Ports = "445"
|
case "portscan":
|
||||||
case "portscan":
|
Info.Ports = DefaultPorts + "," + Webport
|
||||||
Info.Ports = DefaultPorts + "," + Webport
|
case "main":
|
||||||
case "main":
|
Info.Ports = DefaultPorts
|
||||||
Info.Ports = DefaultPorts
|
default:
|
||||||
default:
|
port, _ := PORTList[Info.Scantype]
|
||||||
port, _ := PORTList[Info.Scantype]
|
Info.Ports = strconv.Itoa(port)
|
||||||
Info.Ports = strconv.Itoa(port)
|
|
||||||
}
|
|
||||||
fmt.Println("-m ", Info.Scantype, " start scan the port:", Info.Ports)
|
|
||||||
}
|
}
|
||||||
|
fmt.Println("-m ", Info.Scantype, " start scan the port:", Info.Ports)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user