Skip to content

Commit

Permalink
initial implementation of the Amass tracker tool
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Feb 21, 2019
1 parent a26b8e3 commit 19ae22c
Show file tree
Hide file tree
Showing 10 changed files with 751 additions and 276 deletions.
24 changes: 21 additions & 3 deletions .goreleaser.yaml
Expand Up @@ -38,6 +38,24 @@ builds:
- goos: windows
goarch: 386

-
main: ./cmd/amass.viz/main.go
binary: amass.viz
goos:
- windows
- linux
- darwin
goarch:
- amd64
- 386
env:
- CGO_ENABLED=0
ignore:
- goos: darwin
goarch: 386
- goos: windows
goarch: 386

-
main: ./cmd/amass.db/main.go
binary: amass.db
Expand All @@ -55,10 +73,10 @@ builds:
goarch: 386
- goos: windows
goarch: 386

-
main: ./cmd/amass.viz/main.go
binary: amass.viz
main: ./cmd/amass.tracker/main.go
binary: amass.tracker
goos:
- windows
- linux
Expand Down
4 changes: 2 additions & 2 deletions amass/amass.go
Expand Up @@ -279,7 +279,7 @@ loop:
case <-e.Done:
break loop
case <-t.C:
out := e.Graph.GetUnreadOutput(e.Config.UUID.String())
out := e.Graph.GetOutput(e.Config.UUID.String(), false)
for _, o := range out {
if time.Now().Add(10 * time.Second).After(o.Timestamp) {
e.Graph.MarkAsRead(&handlers.DataOptsParams{
Expand All @@ -296,7 +296,7 @@ loop:
}
}
// Handle all remaining pieces of output
out := e.Graph.GetUnreadOutput(e.Config.UUID.String())
out := e.Graph.GetOutput(e.Config.UUID.String(), false)
for _, o := range out {
if !e.filter.Duplicate(o.Name) {
e.Graph.MarkAsRead(&handlers.DataOptsParams{
Expand Down
26 changes: 21 additions & 5 deletions amass/handlers/dataopts.go
Expand Up @@ -6,6 +6,7 @@ package handlers
import (
"encoding/json"
"io"
"time"

"github.com/OWASP/Amass/amass/core"
)
Expand Down Expand Up @@ -35,6 +36,26 @@ func (d *DataOptsHandler) Insert(data *DataOptsParams) error {
return d.Enc.Encode(data)
}

// EnumerationList returns a list of enumeration IDs found in the data.
func (d *DataOptsHandler) EnumerationList() []string {
return []string{}
}

// EnumerationDomains returns the domains that were involved in the provided enumeration.
func (d *DataOptsHandler) EnumerationDomains(uuid string) []string {
return []string{}
}

// EnumerationDateRange returns the date range associated with the provided enumeration UUID.
func (d *DataOptsHandler) EnumerationDateRange(uuid string) (time.Time, time.Time) {
return time.Now(), time.Now()
}

// GetOutput implements the Amass DataHandler interface.
func (d *DataOptsHandler) GetOutput(uuid string, marked bool) []*core.Output {
return nil
}

// MarkAsRead implements the Amass DataHandler interface.
func (d *DataOptsHandler) MarkAsRead(data *DataOptsParams) error {
return nil
Expand All @@ -44,8 +65,3 @@ func (d *DataOptsHandler) MarkAsRead(data *DataOptsParams) error {
func (d *DataOptsHandler) IsCNAMENode(data *DataOptsParams) bool {
return false
}

// GetUnreadOutput implements the Amass DataHandler interface.
func (d *DataOptsHandler) GetUnreadOutput(uuid string) []*core.Output {
return nil
}

0 comments on commit 19ae22c

Please sign in to comment.