diff --git a/lib/rex/proto/dns/server.rb b/lib/rex/proto/dns/server.rb index 585b8c6855..2064ad6953 100644 --- a/lib/rex/proto/dns/server.rb +++ b/lib/rex/proto/dns/server.rb @@ -174,6 +174,13 @@ class Server end end + # + # Check if server is running + # + def running? + @running == true + end + # # Start the DNS server and cache # @@ -190,6 +197,7 @@ class Server @tcp_sock.start end @cache.start + @running = true end # @@ -203,6 +211,7 @@ class Server end @tcp_sock.stop if @tcp_sock @cache.stop(flush_cache) + @running = false end #