From 41ec4489dab673038f7965ef4a4fb0a2bab1f8b9 Mon Sep 17 00:00:00 2001 From: shadow1ng Date: Tue, 9 Mar 2021 17:21:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E4=B8=8B-m=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/Parse.go | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/common/Parse.go b/common/Parse.go index 8cee786..39a3d01 100644 --- a/common/Parse.go +++ b/common/Parse.go @@ -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) +}