优化一下-m显示

This commit is contained in:
shadow1ng 2021-03-09 17:21:27 +08:00
parent 6ed5967705
commit 41ec4489da
1 changed files with 11 additions and 7 deletions

View File

@ -10,10 +10,10 @@ import (
)
func Parse(Info *HostInfo) {
ParseScantype(Info)
ParseUser(Info)
ParsePass(Info)
ParseInput(Info)
ParseScantype(Info)
}
func ParseUser(Info *HostInfo) {
@ -122,12 +122,7 @@ func ParseInput(Info *HostInfo) {
func ParseScantype(Info *HostInfo) {
_, ok := PORTList[Info.Scantype]
if !ok {
fmt.Println("The specified scan type does not exist")
fmt.Println("-m")
for name := range PORTList {
fmt.Println(" [" + name + "]")
}
os.Exit(0)
showmode()
}
if Info.Scantype != "all" {
if Info.Ports == DefaultPorts {
@ -169,3 +164,12 @@ func getpath() string {
}
return path
}
func showmode() {
fmt.Println("The specified scan type does not exist")
fmt.Println("-m")
for name := range PORTList {
fmt.Println(" [" + name + "]")
}
os.Exit(0)
}