Skip to content

Commit 6ea10f0

Browse files
committed
updated copyright dates
1 parent 67c4a0b commit 6ea10f0

File tree

5 files changed

+10
-44
lines changed

5 files changed

+10
-44
lines changed

cmd/oam_enum/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
1+
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
22
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
33
// SPDX-License-Identifier: Apache-2.0
44

internal/enum/assets.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
1+
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
22
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
33
// SPDX-License-Identifier: Apache-2.0
44

internal/enum/assets_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
1+
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
22
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
33
// SPDX-License-Identifier: Apache-2.0
44

internal/enum/cli.go

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
1+
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
22
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -40,18 +40,15 @@ type Args struct {
4040
BruteWordListMask *stringset.Set
4141
Blacklist *stringset.Set
4242
Domains *stringset.Set
43+
Engine string
4344
Excluded *stringset.Set
4445
Included *stringset.Set
4546
Interface string
46-
MaxDNSQueries int
47-
ResolverQPS int
48-
TrustedQPS int
4947
MaxDepth int
5048
MinForRecursive int
5149
Names *stringset.Set
5250
Ports afmt.ParseInts
5351
Resolvers *stringset.Set
54-
Trusted *stringset.Set
5552
Timeout int
5653
Options struct {
5754
Active bool
@@ -74,13 +71,10 @@ type Args struct {
7471
ConfigFile string
7572
Directory string
7673
Domains afmt.ParseStrings
77-
ExcludedSrcs string
78-
IncludedSrcs string
7974
JSONOutput string
8075
LogFile string
8176
Names afmt.ParseStrings
8277
Resolvers afmt.ParseStrings
83-
Trusted afmt.ParseStrings
8478
}
8579
}
8680

@@ -101,13 +95,10 @@ func defineArgumentFlags(fs *flag.FlagSet, args *Args) {
10195
fs.Var(args.Blacklist, "bl", "Blacklist of subdomain names that will not be investigated")
10296
fs.Var(args.BruteWordListMask, "wm", "\"hashcat-style\" wordlist masks for DNS brute forcing")
10397
fs.Var(args.Domains, "d", "Domain names separated by commas (can be used multiple times)")
98+
fs.StringVar(&args.Engine, "engine", "", "URL for the collection engine (Default: http://127.0.0.1:4000)")
10499
fs.Var(args.Excluded, "exclude", "Data source names separated by commas to be excluded")
105100
fs.Var(args.Included, "include", "Data source names separated by commas to be included")
106101
fs.StringVar(&args.Interface, "iface", "", "Provide the network interface to send traffic through")
107-
fs.IntVar(&args.MaxDNSQueries, "max-dns-queries", 0, "Deprecated flag to be replaced by dns-qps in version 4.0")
108-
fs.IntVar(&args.MaxDNSQueries, "dns-qps", 0, "Maximum number of DNS queries per second across all resolvers")
109-
fs.IntVar(&args.ResolverQPS, "rqps", 0, "Maximum number of DNS queries per second for each untrusted resolver")
110-
fs.IntVar(&args.TrustedQPS, "trqps", 0, "Maximum number of DNS queries per second for each trusted resolver")
111102
fs.IntVar(&args.MaxDepth, "max-depth", 0, "Maximum number of subdomain labels for brute forcing")
112103
fs.IntVar(&args.MinForRecursive, "min-for-recursive", 1, "Subdomain labels seen before recursive brute forcing (Default: 1)")
113104
fs.Var(&args.Ports, "p", "Ports separated by commas (default: 80, 443)")
@@ -139,12 +130,9 @@ func defineFilepathFlags(fs *flag.FlagSet, args *Args) {
139130
fs.StringVar(&args.Filepaths.ConfigFile, "config", "", "Path to the YAML configuration file. Additional details below")
140131
fs.StringVar(&args.Filepaths.Directory, "dir", "", "Path to the directory containing the output files")
141132
fs.Var(&args.Filepaths.Domains, "df", "Path to a file providing root domain names")
142-
fs.StringVar(&args.Filepaths.ExcludedSrcs, "ef", "", "Path to a file providing data sources to exclude")
143-
fs.StringVar(&args.Filepaths.IncludedSrcs, "if", "", "Path to a file providing data sources to include")
144133
fs.StringVar(&args.Filepaths.LogFile, "log", "", "Path to the log file where errors will be written")
145134
fs.Var(&args.Filepaths.Names, "nf", "Path to a file providing already known subdomain names (from other tools/sources)")
146135
fs.Var(&args.Filepaths.Resolvers, "rf", "Path to a file providing untrusted DNS resolvers")
147-
fs.Var(&args.Filepaths.Trusted, "trf", "Path to a file providing trusted DNS resolvers")
148136
}
149137

150138
func CLIWorkflow(cmdName string, clArgs []string) {
@@ -322,7 +310,6 @@ func argsAndConfig(cmdName string, clArgs []string) (*config.Config, *Args) {
322310
Included: stringset.New(),
323311
Names: stringset.New(),
324312
Resolvers: stringset.New(),
325-
Trusted: stringset.New(),
326313
}
327314

328315
fs := NewFlagset(&args, flag.ContinueOnError)
@@ -370,12 +357,6 @@ func argsAndConfig(cmdName string, clArgs []string) (*config.Config, *Args) {
370357
if args.BruteWordListMask.Len() > 0 {
371358
args.BruteWordList.Union(args.BruteWordListMask)
372359
}
373-
if (args.Excluded.Len() > 0 || args.Filepaths.ExcludedSrcs != "") &&
374-
(args.Included.Len() > 0 || args.Filepaths.IncludedSrcs != "") {
375-
_, _ = afmt.R.Fprintln(color.Error, "Cannot provide both include and exclude arguments")
376-
usage()
377-
os.Exit(1)
378-
}
379360
if err := processInputFiles(&args); err != nil {
380361
_, _ = fmt.Fprintf(color.Error, "%v\n", err)
381362
os.Exit(1)
@@ -426,6 +407,9 @@ func (e Args) OverrideConfig(conf *config.Config) error {
426407
if e.Filepaths.Directory != "" {
427408
conf.Dir = e.Filepaths.Directory
428409
}
410+
if e.Engine != "" {
411+
conf.EngineAPI = &config.EngAPI{URL: e.Engine}
412+
}
429413
if e.Names.Len() > 0 {
430414
conf.ProvidedNames = e.Names.Slice()
431415
}
@@ -460,21 +444,9 @@ func (e Args) OverrideConfig(conf *config.Config) error {
460444
if e.Options.Verbose {
461445
conf.Verbose = true
462446
}
463-
if e.ResolverQPS > 0 {
464-
conf.ResolversQPS = e.ResolverQPS
465-
}
466-
if e.TrustedQPS > 0 {
467-
conf.TrustedQPS = e.TrustedQPS
468-
}
469447
if e.Resolvers.Len() > 0 {
470448
conf.SetResolvers(e.Resolvers.Slice()...)
471449
}
472-
if e.Trusted.Len() > 0 {
473-
conf.SetTrustedResolvers(e.Trusted.Slice()...)
474-
}
475-
if e.MaxDNSQueries > 0 {
476-
conf.MaxDNSQueries = e.MaxDNSQueries
477-
}
478450
// Attempt to add the provided domains to the configuration
479451
conf.AddDomains(e.Domains.Slice()...)
480452
return nil

internal/enum/files.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
1+
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
22
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
33
// SPDX-License-Identifier: Apache-2.0
44

@@ -61,12 +61,6 @@ func processInputFiles(args *Args) error {
6161
if err := getList([]string{args.Filepaths.Blacklist}, "blacklist", args.Blacklist); err != nil {
6262
return err
6363
}
64-
if err := getList([]string{args.Filepaths.ExcludedSrcs}, "exclude", args.Excluded); err != nil {
65-
return err
66-
}
67-
if err := getList([]string{args.Filepaths.IncludedSrcs}, "include", args.Included); err != nil {
68-
return err
69-
}
7064
if err := getList(args.Filepaths.Names, "subdomain names", args.Names); err != nil {
7165
return err
7266
}

0 commit comments

Comments
 (0)