mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-24 20:21:52 +08:00
fix bug
This commit is contained in:
+1
-4
@@ -23,9 +23,6 @@ var ParseIPErr = errors.New(" host parsing error\n" +
|
|||||||
"192.168.1.1-255")
|
"192.168.1.1-255")
|
||||||
|
|
||||||
func ParseIP(host string, filename string, nohosts ...string) (hosts []string, err error) {
|
func ParseIP(host string, filename string, nohosts ...string) (hosts []string, err error) {
|
||||||
if host == "" {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
hosts = ParseIPs(host)
|
hosts = ParseIPs(host)
|
||||||
if filename != "" {
|
if filename != "" {
|
||||||
var filehost []string
|
var filehost []string
|
||||||
@@ -57,7 +54,7 @@ func ParseIP(host string, filename string, nohosts ...string) (hosts []string, e
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hosts = RemoveDuplicate(hosts)
|
hosts = RemoveDuplicate(hosts)
|
||||||
if len(hosts) == 0 {
|
if len(hosts) == 0 && host != "" && filename != "" {
|
||||||
err = ParseIPErr
|
err = ParseIPErr
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user