From dad3be1b9176deccbe90a2469cf8952092c9fadd Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Thu, 14 May 2015 07:14:35 +1000 Subject: [PATCH] replace backticks with IO.open --- test/integration/tc_dns_rest.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/integration/tc_dns_rest.rb b/test/integration/tc_dns_rest.rb index 39389f780..cd2a19906 100644 --- a/test/integration/tc_dns_rest.rb +++ b/test/integration/tc_dns_rest.rb @@ -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