diff --git a/abusehelper/lib/facter/botnets.rb b/abusehelper/lib/facter/botnets.rb index 5921fbc..75000f9 100644 --- a/abusehelper/lib/facter/botnets.rb +++ b/abusehelper/lib/facter/botnets.rb @@ -4,7 +4,7 @@ Facter.add(:botnets) do if File.executable?("/usr/bin/botnet") listcmd = "su -s /bin/sh - nobody -c '/usr/bin/botnet list'" output = Facter::Util::Resolution.exec(listcmd) - output.lines.each do |line| + output.each_line do |line| if m = line.match(/^\[\d+\]\s+(.*\.py)/) botnets << File.basename(File.dirname(m[1])) end