tools/ipmi-vulns.rb in dap-0.0.1 vs tools/ipmi-vulns.rb in dap-0.0.2

- old
+ new

@@ -20,8 +20,10 @@ hash["VULN-IPMI-ANON"] = "true" end hash end -while line=gets - puts Oj.dump(search(Oj.load(line.strip))) +$stdin.each_line do |line| + json = Oj.load(line.unpack("C*").pack("C*").strip) rescue nil + next unless json + puts Oj.dump(search(json)) end