mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-05-07 11:16:31 +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")
|
||||
|
||||
func ParseIP(host string, filename string, nohosts ...string) (hosts []string, err error) {
|
||||
if host == "" {
|
||||
return
|
||||
}
|
||||
hosts = ParseIPs(host)
|
||||
if filename != "" {
|
||||
var filehost []string
|
||||
@ -57,7 +54,7 @@ func ParseIP(host string, filename string, nohosts ...string) (hosts []string, e
|
||||
}
|
||||
}
|
||||
hosts = RemoveDuplicate(hosts)
|
||||
if len(hosts) == 0 {
|
||||
if len(hosts) == 0 && host != "" && filename != "" {
|
||||
err = ParseIPErr
|
||||
}
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user