diff --git a/runner/options.go b/runner/options.go index a71c12f..6b08ca4 100644 --- a/runner/options.go +++ b/runner/options.go @@ -56,7 +56,7 @@ func (options *Options) validateOptions() error { return errors.New("verbose and silent can't be used together") } - if options.Asn == nil && options.Ip == nil && options.Org == nil && options.Domain == nil && !fileutil.HasStdin() && cfgFile == "" { + if options.Asn == nil && options.Ip == nil && options.Org == nil && options.Domain == nil && !fileutil.HasStdin() && cfgFile == "" && options.FileInput == nil { return errors.New("no input defined") } @@ -97,7 +97,7 @@ func ParseOptions() *Options { flagSet.StringSliceVarP(&options.Ip, "ip", "i", nil, "target ip to lookup, example: -i 100.19.12.21, -i 2a10:ad40:: ", goflags.FileNormalizedStringSliceOptions), flagSet.StringSliceVarP(&options.Domain, "domain", "d", nil, "target domain to lookup, example: -d google.com, -d facebook.com", goflags.FileNormalizedStringSliceOptions), flagSet.StringSliceVar(&options.Org, "org", nil, "target organization to lookup, example: -org GOOGLE", goflags.StringSliceOptions), - flagSet.StringSliceVarP(&options.FileInput, "file", "f", nil, "targets to lookup from file", goflags.CommaSeparatedStringSliceOptions), + flagSet.StringSliceVarP(&options.FileInput, "file", "f", nil, "targets to lookup from file", goflags.FileCommaSeparatedStringSliceOptions), ) // Configs diff --git a/runner/runner_test.go b/runner/runner_test.go index ab5269e..30f8160 100644 --- a/runner/runner_test.go +++ b/runner/runner_test.go @@ -23,7 +23,7 @@ func TestRunner(t *testing.T) { expectedOutput: []*asnmap.Response{ { FirstIp: "104.16.0.0", - LastIp: "104.21.127.255", + LastIp: "104.22.79.255", Input: "104.16.99.52", ASN: 13335, Country: "US",