Update dns_spoof.go

This commit is contained in:
buffermet 2020-03-05 08:43:21 +10:00 committed by GitHub
commit 2f14254c4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,10 +142,7 @@ func (mod *DNSSpoofer) Configure() error {
mod.Session.Firewall.EnableForwarding(true)
}
_ttl, _ := strconv.ParseUint(ttl, 10, 32)
if _ttl <= 0 {
return fmt.Errorf("dns.spoof.ttl value must be 1 or higher")
}
_ttl, _ := strconv.Atoi(ttl)
mod.TTL = uint32(_ttl)
return nil