Class: WhatWeb::CLI

Inherits:
Thor show all
Defined in:
lib/whatweb/cli.rb

Instance Method Summary collapse

Instance Method Details

#list_pluginsObject



26
27
28
29
30
# File 'lib/whatweb/cli.rb', line 26

def list_plugins
  with_error_handling do
    puts WhatWeb.plugin_names.to_json
  end
end

#scan(url) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/whatweb/cli.rb', line 14

def scan(url)
  user_agent = options[:user_agent]
  is_aggressive = options[:aggressive]
  max_threads = options[:max_threads]

  with_error_handling do
    hash = WhatWeb.execute_plugins(url, user_agent: user_agent, is_aggressive: is_aggressive, max_threads: max_threads)
    puts hash.to_json
  end
end