replace backticks with IO.open

This commit is contained in:
Brendan Coles
2015-05-14 07:14:35 +10:00
parent 0261c1d56f
commit dad3be1b91

View File

@@ -381,8 +381,7 @@ class TC_DnsRest < Test::Unit::TestCase
address = @@config.get('beef.extension.dns.address')
port = @@config.get('beef.extension.dns.port')
#TODO antisnatchor: dangerous, replace with IO.open([param_array]) as in web_cloner.rb
dig_output = `dig @#{address} -p #{port} -t #{type} #{pattern}`
dig_output = IO.popen(["dig", "@#{address}", "-p", "#{port}", "-t", "#{type}", "#{pattern}"], 'r+').read
assert_match(regex, dig_output)
end