mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-05-08 11:46:34 +00:00
fix bug
This commit is contained in:
parent
6807508b69
commit
e875f4f930
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user