Skip to content

Commit

Permalink
for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Oct 18, 2024
1 parent ba9988e commit de47217
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions engine/plugins/horizontals/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (
oam "github.com/owasp-amass/open-asset-model"
"github.com/owasp-amass/open-asset-model/domain"
oamnet "github.com/owasp-amass/open-asset-model/network"
oamreg "github.com/owasp-amass/open-asset-model/registration"
"github.com/owasp-amass/open-asset-model/source"
"github.com/owasp-amass/resolve"
"golang.org/x/net/publicsuffix"
Expand Down Expand Up @@ -164,20 +163,22 @@ func (h *horizPlugin) makeAssocRelationshipEntries(e *et.Event, assoc, assoc2 *d
func (h *horizPlugin) process(e *et.Event, assets []*dbt.Asset, src *dbt.Asset) {
for _, asset := range assets {
// check for new networks added to the scope
switch v := asset.Asset.(type) {
case *oamnet.Netblock:
h.ipPTRTargetsInScope(e, asset, src)
h.sweepAroundIPs(e, asset, src)
h.sweepNetblock(e, v, src)
case *oamreg.IPNetRecord:
if a, hit := e.Session.Cache().GetAsset(&oamnet.Netblock{CIDR: v.CIDR, Type: v.Type}); hit && a != nil {
if nb, ok := a.Asset.(*oamnet.Netblock); ok {
h.ipPTRTargetsInScope(e, a, src)
h.sweepAroundIPs(e, a, src)
h.sweepNetblock(e, nb, src)
/*
switch v := asset.Asset.(type) {
case *oamnet.Netblock:
h.ipPTRTargetsInScope(e, asset, src)
h.sweepAroundIPs(e, asset, src)
h.sweepNetblock(e, v, src)
case *oamreg.IPNetRecord:
if a, hit := e.Session.Cache().GetAsset(&oamnet.Netblock{CIDR: v.CIDR, Type: v.Type}); hit && a != nil {
if nb, ok := a.Asset.(*oamnet.Netblock); ok {
h.ipPTRTargetsInScope(e, a, src)
h.sweepAroundIPs(e, a, src)
h.sweepNetblock(e, nb, src)
}
}
}
}
*/

_ = e.Dispatcher.DispatchEvent(&et.Event{
Name: asset.Asset.Key(),
Expand Down

0 comments on commit de47217

Please sign in to comment.