diff --git a/subbrute.py b/subbrute.py index 37191cd..8475588 100755 --- a/subbrute.py +++ b/subbrute.py @@ -24,6 +24,9 @@ import socket import struct +# Minimum number of seconds to wait before querying the same nameserver again +REPEAT_TIMEOUT = 5 + #Python 2.x and 3.x compatiablity #We need the Queue library for exception handling try: @@ -57,6 +60,9 @@ def query(self, hostname, query_type = 'ANY', name_server = False, use_tcp = Tru response = None if name_server == False: name_server = self.get_ns() + # If we just picked the same one again, give it a break + if self.last_resolver == name_server: + time.sleep(REPEAT_TIMEOUT) else: self.wildcards = {} self.failed_code = None @@ -856,4 +862,4 @@ def signal_init(): target = target.strip() if target: trace(target, record_type, options.subs, options.resolvers, options.process_count, options.print_data, output, json_output) - print_target(target, record_type, options.subs, options.resolvers, options.process_count, options.print_data, output, json_output) \ No newline at end of file + print_target(target, record_type, options.subs, options.resolvers, options.process_count, options.print_data, output, json_output)