mirror of
https://github.com/owasp-amass/amass.git
synced 2026-10-11 22:49:54 +00:00
updated copyright dates and small changes
This commit is contained in:
@@ -190,7 +190,7 @@ License: Apache2.0
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2017-2025 Jeff Foley
|
||||
Copyright 2017-2026 Jeff Foley
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -30,6 +30,6 @@ If you need help with installation and/or usage of the tool, please join our [Di
|
||||
|
||||
## Licensing [](https://www.apache.org/licenses/LICENSE-2.0)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the [Apache license](LICENSE). OWASP Amass and any contributions are Copyright © by Jeff Foley 2017-2025. Some subcomponents have separate licenses.
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the [Apache license](LICENSE). OWASP Amass and any contributions are Copyright © by Jeff Foley 2017-2026. Some subcomponents have separate licenses.
|
||||
|
||||

|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -43,7 +43,7 @@ func main() {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
|
||||
defer cancel()
|
||||
|
||||
u := "http://" + hostname + ":4000/graphql"
|
||||
u := "http://" + hostname + ":4000"
|
||||
if _, err := amasshttp.RequestWebPage(ctx, &amasshttp.Request{URL: u}); err != nil {
|
||||
// a failure to respond indicates that the server is not yet available
|
||||
os.Exit(1)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//go:build !windows
|
||||
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//go:build windows
|
||||
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+5
-14
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
@@ -356,10 +357,8 @@ func (c *Config) AddDomain(domain string) {
|
||||
}
|
||||
|
||||
// Check that none of the labels are empty
|
||||
for _, label := range labels {
|
||||
if label == "" {
|
||||
return
|
||||
}
|
||||
if slices.Contains(labels, "") {
|
||||
return
|
||||
}
|
||||
|
||||
// Check that the regular expression map has been initialized
|
||||
@@ -379,15 +378,7 @@ func (c *Config) AddDomain(domain string) {
|
||||
|
||||
func uniqueIntAppend(s []int, e string) []int {
|
||||
if a1, err := strconv.Atoi(e); err == nil {
|
||||
var found bool
|
||||
|
||||
for _, a2 := range s {
|
||||
if a1 == a2 {
|
||||
found = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
if !slices.Contains(s, a1) {
|
||||
s = append(s, a1)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -10,7 +10,7 @@ func (c *Config) loadActiveSettings(cfg *Config) error {
|
||||
// Retrieve the active option from the configuration
|
||||
activeinterface, ok := c.Options["active"]
|
||||
if !ok {
|
||||
// "active" not found in options, so nothing to do here.
|
||||
// "active" not found in options, so nothing to do here
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ func (c *Config) loadActiveSettings(cfg *Config) error {
|
||||
if !ok {
|
||||
return fmt.Errorf("failed to parse active setting, value is not a boolean")
|
||||
}
|
||||
|
||||
c.Active = active
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -90,7 +90,7 @@ func (c *Config) LoadEngineEnvSettings() error {
|
||||
port = pEnv
|
||||
}
|
||||
eng.Port = port
|
||||
path := "graphql"
|
||||
path := ""
|
||||
if pEnv, set := os.LookupEnv(enginePath); set {
|
||||
path = pEnv
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -7,10 +7,10 @@ package config
|
||||
import "fmt"
|
||||
|
||||
func (c *Config) loadRigidSettings(cfg *Config) error {
|
||||
// Retrieve the rigid_boundaries option from the configuration
|
||||
// retrieve the rigid_boundaries option from the configuration
|
||||
rigidinterface, ok := c.Options["rigid_boundaries"]
|
||||
if !ok {
|
||||
// "rigid_boundaries" not found in options, so nothing to do here.
|
||||
// "rigid_boundaries" not found in options, so nothing to do here
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ func (c *Config) loadRigidSettings(cfg *Config) error {
|
||||
if !ok {
|
||||
return fmt.Errorf("failed to parse rigid_boundaries setting, value is not a boolean")
|
||||
}
|
||||
|
||||
c.Rigid = rigid
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ func (b *bing) Start(r et.Registry) error {
|
||||
Plugin: b,
|
||||
Name: b.name + "-Handler",
|
||||
Position: 33,
|
||||
Exclusive: true,
|
||||
MaxInstances: support.MidHandlerInstances,
|
||||
Transforms: []string{string(oam.FQDN)},
|
||||
EventType: oam.FQDN,
|
||||
@@ -103,8 +104,12 @@ func (b *bing) query(e *et.Event, name string) []*dbt.Entity {
|
||||
defer subs.Close()
|
||||
|
||||
for i := 1; i < 10; i++ {
|
||||
_ = b.rlimit.Wait(context.TODO())
|
||||
resp, err := http.RequestWebPage(context.TODO(), &http.Request{URL: fmt.Sprintf(b.fmtstr, i, name, name)})
|
||||
_ = b.rlimit.Wait(e.Session.Ctx())
|
||||
|
||||
ctx, cancel := context.WithTimeout(e.Session.Ctx(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
resp, err := http.RequestWebPage(ctx, &http.Request{URL: fmt.Sprintf(b.fmtstr, i, name, name)})
|
||||
if err != nil || resp.Body == "" {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -55,6 +55,7 @@ func (d *dnsHistory) Start(r et.Registry) error {
|
||||
Plugin: d,
|
||||
Name: d.name + "-Handler",
|
||||
Position: 34,
|
||||
Exclusive: true,
|
||||
MaxInstances: support.MidHandlerInstances,
|
||||
Transforms: []string{string(oam.FQDN)},
|
||||
EventType: oam.FQDN,
|
||||
@@ -103,8 +104,12 @@ func (d *dnsHistory) query(e *et.Event, name string) []*dbt.Entity {
|
||||
defer subs.Close()
|
||||
|
||||
for i := 1; i < 20; i++ {
|
||||
_ = d.rlimit.Wait(context.TODO())
|
||||
resp, err := http.RequestWebPage(context.TODO(), &http.Request{URL: fmt.Sprintf(d.fmtstr, i, name)})
|
||||
_ = d.rlimit.Wait(e.Session.Ctx())
|
||||
|
||||
ctx, cancel := context.WithTimeout(e.Session.Ctx(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
resp, err := http.RequestWebPage(ctx, &http.Request{URL: fmt.Sprintf(d.fmtstr, i, name)})
|
||||
if err != nil || resp.Body == "" {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ func (d *duckDuckGo) Start(r et.Registry) error {
|
||||
Plugin: d,
|
||||
Name: d.name + "-Handler",
|
||||
Position: 35,
|
||||
Exclusive: true,
|
||||
MaxInstances: support.MidHandlerInstances,
|
||||
Transforms: []string{string(oam.FQDN)},
|
||||
EventType: oam.FQDN,
|
||||
@@ -102,8 +103,11 @@ func (d *duckDuckGo) query(e *et.Event, name string) []*dbt.Entity {
|
||||
subs := stringset.New()
|
||||
defer subs.Close()
|
||||
|
||||
_ = d.rlimit.Wait(context.TODO())
|
||||
resp, err := http.RequestWebPage(context.TODO(), &http.Request{URL: fmt.Sprintf(d.fmtstr, name, name)})
|
||||
_ = d.rlimit.Wait(e.Session.Ctx())
|
||||
ctx, cancel := context.WithTimeout(e.Session.Ctx(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
resp, err := http.RequestWebPage(ctx, &http.Request{URL: fmt.Sprintf(d.fmtstr, name, name)})
|
||||
if err != nil || resp.Body == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ func (v *ipverse) Start(r et.Registry) error {
|
||||
Plugin: v,
|
||||
Name: v.name + "-Handler",
|
||||
Position: 30,
|
||||
Exclusive: true,
|
||||
MaxInstances: support.MidHandlerInstances,
|
||||
Transforms: []string{string(oam.Netblock)},
|
||||
EventType: oam.AutonomousSystem,
|
||||
|
||||
@@ -55,6 +55,7 @@ func (rd *rapidDNS) Start(r et.Registry) error {
|
||||
Plugin: rd,
|
||||
Name: rd.name + "-Handler",
|
||||
Position: 36,
|
||||
Exclusive: true,
|
||||
MaxInstances: support.MidHandlerInstances,
|
||||
Transforms: []string{string(oam.FQDN)},
|
||||
EventType: oam.FQDN,
|
||||
@@ -102,8 +103,11 @@ func (rd *rapidDNS) query(e *et.Event, name string) []*dbt.Entity {
|
||||
subs := stringset.New()
|
||||
defer subs.Close()
|
||||
|
||||
_ = rd.rlimit.Wait(context.TODO())
|
||||
resp, err := http.RequestWebPage(context.TODO(), &http.Request{URL: fmt.Sprintf(rd.fmtstr, name)})
|
||||
_ = rd.rlimit.Wait(e.Session.Ctx())
|
||||
ctx, cancel := context.WithTimeout(e.Session.Ctx(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
resp, err := http.RequestWebPage(ctx, &http.Request{URL: fmt.Sprintf(rd.fmtstr, name)})
|
||||
if err != nil || resp.Body == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -55,6 +55,7 @@ func (sd *siteDossier) Start(r et.Registry) error {
|
||||
Plugin: sd,
|
||||
Name: sd.name + "-Handler",
|
||||
Position: 37,
|
||||
Exclusive: true,
|
||||
MaxInstances: support.MidHandlerInstances,
|
||||
Transforms: []string{string(oam.FQDN)},
|
||||
EventType: oam.FQDN,
|
||||
@@ -103,8 +104,12 @@ func (sd *siteDossier) query(e *et.Event, name string) []*dbt.Entity {
|
||||
defer subs.Close()
|
||||
|
||||
for i := 1; i < 20; i++ {
|
||||
_ = sd.rlimit.Wait(context.TODO())
|
||||
resp, err := http.RequestWebPage(context.TODO(), &http.Request{URL: fmt.Sprintf(sd.fmtstr, name, i)})
|
||||
_ = sd.rlimit.Wait(e.Session.Ctx())
|
||||
|
||||
ctx, cancel := context.WithTimeout(e.Session.Ctx(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
resp, err := http.RequestWebPage(ctx, &http.Request{URL: fmt.Sprintf(sd.fmtstr, name, i)})
|
||||
if err != nil || resp.Body == "" {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -42,7 +42,10 @@ func (r *txtHandler) check(e *et.Event) error {
|
||||
func (r *txtHandler) lookup(e *et.Event, since time.Time) []string {
|
||||
var rdata []string
|
||||
|
||||
if tags, err := e.Session.DB().FindEntityTags(context.Background(), e.Entity, since, "dns_record"); err == nil {
|
||||
ctx, cancel := context.WithTimeout(e.Session.Ctx(), 10*time.Second)
|
||||
defer cancel()
|
||||
|
||||
if tags, err := e.Session.DB().FindEntityTags(ctx, e.Entity, since, "dns_record"); err == nil {
|
||||
for _, tag := range tags {
|
||||
if prop, ok := tag.Property.(*oamdns.DNSRecordProperty); ok && prop.Header.RRType == int(dns.TypeTXT) {
|
||||
rdata = append(rdata, prop.Data)
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
dbt "github.com/owasp-amass/asset-db/types"
|
||||
oam "github.com/owasp-amass/open-asset-model"
|
||||
oamdns "github.com/owasp-amass/open-asset-model/dns"
|
||||
"github.com/owasp-amass/open-asset-model/general"
|
||||
oamgen "github.com/owasp-amass/open-asset-model/general"
|
||||
)
|
||||
|
||||
type fqdnEndpoint struct {
|
||||
@@ -68,7 +68,7 @@ func (fe *fqdnEndpoint) check(e *et.Event) error {
|
||||
func (fe *fqdnEndpoint) lookup(e *et.Event, host *dbt.Entity, since time.Time) []*support.Finding {
|
||||
var findings []*support.Finding
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
ctx, cancel := context.WithTimeout(e.Session.Ctx(), 30*time.Second)
|
||||
defer cancel()
|
||||
|
||||
if edges, err := e.Session.DB().OutgoingEdges(ctx, host, since); err == nil && len(edges) > 0 {
|
||||
@@ -76,7 +76,7 @@ func (fe *fqdnEndpoint) lookup(e *et.Event, host *dbt.Entity, since time.Time) [
|
||||
if _, err := e.Session.DB().FindEdgeTags(ctx, edge, since, fe.plugin.source.Name); err != nil {
|
||||
continue
|
||||
}
|
||||
if _, ok := edge.Relation.(*general.PortRelation); ok {
|
||||
if _, ok := edge.Relation.(*oamgen.PortRelation); ok {
|
||||
if srv, err := e.Session.DB().FindEntityById(ctx,
|
||||
edge.ToEntity.ID); err == nil && srv != nil && srv.Asset.AssetType() == oam.Service {
|
||||
findings = append(findings, &support.Finding{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
@@ -31,7 +31,7 @@ const Banner = ` .+++:. : .+++.
|
||||
|
||||
const (
|
||||
// Version is used to display the current version of Amass.
|
||||
Version = "v5.0.0"
|
||||
Version = "v5.1.0"
|
||||
|
||||
// Author is used to display the Amass Project Team.
|
||||
Author = "OWASP Amass Project - @owaspamass"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+19
-18
@@ -107,7 +107,7 @@ func defineArgumentFlags(fs *flag.FlagSet, args *Args) {
|
||||
fs.Var(&args.Ports, "p", "Ports separated by commas (default: 80, 443)")
|
||||
fs.Var(args.Resolvers, "r", "IP addresses of untrusted DNS resolvers (can be used multiple times)")
|
||||
fs.Var(args.Resolvers, "tr", "IP addresses of trusted DNS resolvers (can be used multiple times)")
|
||||
fs.IntVar(&args.Timeout, "timeout", 0, "Number of minutes to let enumeration run before quitting")
|
||||
fs.IntVar(&args.Timeout, "timeout", 0, "Minutes to run without progress before terminating (Default: 30)")
|
||||
}
|
||||
|
||||
func defineOptionFlags(fs *flag.FlagSet, args *Args) {
|
||||
@@ -236,6 +236,10 @@ func CLIWorkflow(cmdName string, clArgs []string) {
|
||||
}
|
||||
}
|
||||
|
||||
if args.Timeout == 0 {
|
||||
args.Timeout = 30
|
||||
}
|
||||
|
||||
var progress *pb.ProgressBar
|
||||
if !args.Options.Silent {
|
||||
progress = pb.Start64(int64(count))
|
||||
@@ -243,9 +247,11 @@ func CLIWorkflow(cmdName string, clArgs []string) {
|
||||
|
||||
done := make(chan struct{}, 1)
|
||||
go func() {
|
||||
var finished int
|
||||
var previous, finished int
|
||||
t := time.NewTicker(2 * time.Second)
|
||||
defer t.Stop()
|
||||
term := time.NewTimer(time.Duration(args.Timeout) * time.Minute)
|
||||
defer term.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
@@ -257,14 +263,19 @@ func CLIWorkflow(cmdName string, clArgs []string) {
|
||||
}
|
||||
case <-t.C:
|
||||
if stats, err := c.SessionStats(token); err == nil && stats != nil {
|
||||
stotal := max(count, stats.WorkItemsTotal)
|
||||
scomplete := max(0, stats.WorkItemsCompleted)
|
||||
|
||||
if !args.Options.Silent {
|
||||
stotal := max(count, stats.WorkItemsTotal)
|
||||
scomplete := max(0, stats.WorkItemsCompleted)
|
||||
|
||||
progress.SetTotal(int64(stotal))
|
||||
progress.SetCurrent(int64(scomplete))
|
||||
}
|
||||
|
||||
if comp := stats.WorkItemsCompleted; comp != previous {
|
||||
previous = comp
|
||||
_ = term.Reset(time.Duration(args.Timeout))
|
||||
}
|
||||
|
||||
if stats.WorkItemsCompleted == stats.WorkItemsTotal {
|
||||
finished++
|
||||
if finished == 5 {
|
||||
@@ -275,23 +286,13 @@ func CLIWorkflow(cmdName string, clArgs []string) {
|
||||
finished = 0
|
||||
}
|
||||
}
|
||||
case <-term.C:
|
||||
close(done)
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
if args.Timeout > 0 {
|
||||
go func() {
|
||||
t := time.NewTimer(time.Minute * time.Duration(args.Timeout))
|
||||
defer t.Stop()
|
||||
|
||||
select {
|
||||
case <-done:
|
||||
case <-t.C:
|
||||
close(done)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
select {
|
||||
case <-done:
|
||||
case <-interrupt:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright © by Jeff Foley 2017-2025. All rights reserved.
|
||||
// Copyright © by Jeff Foley 2017-2026. All rights reserved.
|
||||
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user