Skip to content

Commit

Permalink
fixed bug preventing proper termination
Browse files Browse the repository at this point in the history
  • Loading branch information
caffix committed Jun 2, 2020
1 parent d69ce87 commit 774e946
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
4 changes: 3 additions & 1 deletion cmd/amass/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ loop:
next := time.Now().Sub(started) * 5
if next < 3*time.Second {
next = 3 * time.Second
} else if next > 10*time.Second {
next = 10 * time.Second
}
t.Reset(next)
}
Expand All @@ -511,7 +513,7 @@ func signalHandler(e *enum.Enumeration) {
// Signal the enumeration to finish
e.Done()
// Wait for output operations to complete
time.Sleep(5 * time.Second)
time.Sleep(20 * time.Second)
os.Exit(1)
}

Expand Down
14 changes: 3 additions & 11 deletions enum/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (e *Enumeration) Start() error {
* discovered names that will train the machine learning system and to
* release the similar names generated by the algorithm
*/
if !e.Config.Passive && e.Config.Alterations {
if false && !e.Config.Passive && e.Config.Alterations {
e.guessMgr = NewGuessManager(e)
defer e.guessMgr.Stop()
e.managers = append(e.managers, e.guessMgr)
Expand Down Expand Up @@ -344,7 +344,7 @@ loop:
if inactive {
// End the enumeration!
e.Done()
continue loop
break loop
}

e.incNumSeqZeros()
Expand Down Expand Up @@ -404,15 +404,7 @@ func (e *Enumeration) requiredNumberOfNames(numsec int) int {
}

max := e.Config.MaxDNSQueries * numsec
// Acquire the number of DNS queries already in the queue
remaining := e.dnsNamesRemaining()
if remaining > 0 {
required = max - remaining
} else {
// If the queue is empty, then encourage additional activity
required = max
}

required = max - e.dnsNamesRemaining()
// Ensure a minimum value of one
if required <= 0 {
required = 1
Expand Down

0 comments on commit 774e946

Please sign in to comment.