You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm a newbie in Go. Is the r.limiter.Take() called repeated here in r.handleHostPortSyn()? Since in the r.RunEnumeratione() there is a r.limiter.Take() already.
func (r *Runner) handleHostPortSyn(host string, port int) {
...
r.limiter.Take() // just delete this line, everything will be right
r.scanner.EnqueueTCP(host, port, scan.SYN)
}
func (r *Runner) RunEnumeration() error {
...
if r.options.Stream {
r.scanner.State = scan.Scan
for cidr := range r.streamChannel {
...
for ip := range ipStream {
for _, port := range r.scanner.Ports {
now := r.limiter.Take() // I changed here to check, and the result shows the duration is doubled
fmt.Println("port:", port, now.Sub(prev))
prev = now
go func(ip string, port int) {
if shouldUseRawPackets {
r.RawSocketEnumeration(ip, port)
...
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I'm a newbie in Go. Is the
r.limiter.Take()
called repeated here inr.handleHostPortSyn()
? Since in ther.RunEnumeratione()
there is ar.limiter.Take()
already.Beta Was this translation helpful? Give feedback.
All reactions