lib/rogue_one/cli.rb in rogue_one-0.2.0 vs lib/rogue_one/cli.rb in rogue_one-0.3.0
- old
+ new
@@ -5,17 +5,19 @@
module RogueOne
class CLI < Thor
desc "report [DNS_SERVER]", "Show a report of a given DNS server"
method_option :custom_list, type: :string, desc: "A path to a custom list of domains"
+ method_option :threshold, type: :numeric, desc: "Threshold value for determining malicious or not"
method_option :verbose, type: :boolean
def report(dns_server)
with_error_handling do
Ping.pong? dns_server
custom_list = options["custom_list"]
+ threshold = options["threshold"]
verbose = options["verbose"]
- detector = Detector.new(target: dns_server, custom_list: custom_list, verbose: verbose)
+ detector = Detector.new(target: dns_server, custom_list: custom_list, threshold: threshold, verbose: verbose)
puts JSON.pretty_generate(detector.report)
end
end
no_commands do