Skip to content
This repository was archived by the owner on Feb 26, 2021. It is now read-only.

Commit f2aedb9

Browse files
authored
Merge pull request #9 from secureCodeBox/develop
Release 1.0.1
2 parents 913db2b + 663d38d commit f2aedb9

6 files changed

Lines changed: 131 additions & 22 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.idea/
22
vendor/
3-
3+
main

Gopkg.lock

Lines changed: 117 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
[[constraint]]
1515
name = "github.com/OWASP/Amass"
16-
version = "=2.9.0"
16+
version = "=2.9.3"
1717

1818
[[constraint]]
1919
name = "github.com/nu7hatch/gouuid"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[![Build Status](https://travis-ci.com/secureCodeBox/scanner-infrastructure-amass.svg?branch=master)](https://travis-ci.com/secureCodeBox/scanner-infrastructure-amass)
22
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
3+
[![GitHub release](https://img.shields.io/github/release/secureCodeBox/scanner-infrastructure-amass.svg)](https://github.com/secureCodeBox/scanner-infrastructure-amass/releases/latest)
34

45
# About
56

ScannerScaffolding/ScannerScaffolding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"os"
1010
"time"
1111

12-
"github.com/nu7hatch/gouuid"
12+
uuid "github.com/nu7hatch/gouuid"
1313
"github.com/op/go-logging"
1414
)
1515

main.go

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import (
99
"time"
1010

1111
"github.com/OWASP/Amass/amass"
12-
"github.com/nu7hatch/gouuid"
12+
"github.com/OWASP/Amass/amass/core"
13+
uuid "github.com/nu7hatch/gouuid"
1314
"github.com/op/go-logging"
1415
"github.com/secureCodeBox/scanner-infrastructure-amass/ScannerScaffolding"
1516
)
@@ -34,8 +35,7 @@ func createJobFailure(jobId, message, details string) ScannerScaffolding.JobFail
3435
func workOnJobs(jobs <-chan ScannerScaffolding.ScanJob, results chan<- ScannerScaffolding.JobResult, failures chan<- ScannerScaffolding.JobFailure) {
3536
for job := range jobs {
3637
logger.Infof("Working on job '%s'", job.JobId)
37-
38-
masterOutput := make(chan *amass.Output)
38+
masterOutput := make(chan *core.Output)
3939

4040
// Seed the default pseudo-random number generator
4141
rand.Seed(time.Now().UTC().UnixNano())
@@ -97,43 +97,37 @@ func workOnJobs(jobs <-chan ScannerScaffolding.ScanJob, results chan<- ScannerSc
9797
}()
9898

9999
for _, target := range job.Targets {
100-
output := make(chan *amass.Output)
100+
enum := amass.NewEnumeration()
101101

102102
go func() {
103-
for result := range output {
103+
for result := range enum.Output {
104104
masterOutput <- result
105105
}
106106
}()
107107

108-
enum := amass.NewEnumeration()
109-
110-
enum.Output = output
111-
112108
if _, isDebug := os.LookupEnv("DEBUG"); isDebug {
113109
logger.Infof("Setting up high verbosity Logger for amass.")
114-
enum.Log = log.New(os.Stdout, "amass", log.Ldate|log.Ltime|log.Lshortfile)
110+
enum.Config.Log = log.New(os.Stdout, "amass", log.Ldate|log.Ltime|log.Lshortfile)
115111
}
116112

117113
logger.Infof("Job '%s' is scanning subdomains for '%s'", job.JobId, target.Location)
118114

119-
config := &amass.Config{}
120-
config.AddDomain(target.Location)
115+
enum.Config.AddDomain(target.Location)
121116

122117
if _, exists := target.Attributes["NO_DNS"]; exists == false {
123-
config.Passive = true
118+
enum.Config.Passive = true
124119
} else {
125120
switch noDNS := target.Attributes["NO_DNS"].(type) {
126121
case bool:
127-
config.Passive = noDNS
122+
enum.Config.Passive = noDNS
128123
default:
129124
failures <- createJobFailure(job.JobId, "Scan Parameter 'NO_DNS' must be boolean", "")
130125
}
131126
}
132127

133-
enum.Config = config
134-
135128
// Begin the enumeration process
136129
enum.Start()
130+
<-enum.Done
137131
}
138132

139133
logger.Infof("Subdomainscan '%s' found %d subdomains.", job.JobId, len(findings))

0 commit comments

Comments
 (0)