mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-24 12:11:52 +08:00
update
This commit is contained in:
+10
-2
@@ -74,7 +74,7 @@ func Readfile(filename string)([]string,error){
|
||||
file, err := os.Open(filename)
|
||||
if err!=nil{
|
||||
fmt.Println("Open %s error, %v", filename,err)
|
||||
return nil,err
|
||||
os.Exit(0)
|
||||
}
|
||||
defer file.Close()
|
||||
var content []string
|
||||
@@ -92,7 +92,7 @@ func Readfile(filename string)([]string,error){
|
||||
|
||||
|
||||
func ParseInput(Info *HostInfo){
|
||||
if Info.Host==""{
|
||||
if Info.Host=="" && Info.HostFile ==""{
|
||||
fmt.Println("Host is none")
|
||||
flag.Usage()
|
||||
os.Exit(0)
|
||||
@@ -123,4 +123,12 @@ func ParseScantype(Info *HostInfo){
|
||||
PORTList[name] = ScanPort
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func CheckErr(text string,err error){
|
||||
if err!=nil{
|
||||
fmt.Println(text,err.Error())
|
||||
os.Exit(0)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user