Class: CMSScanner::Controller::InterestingFindings

Inherits:
Base
  • Object
show all
Defined in:
app/controllers/interesting_findings.rb

Overview

InterestingFindings Controller

Instance Method Summary collapse

Methods inherited from Base

#==, #after_scan, #before_scan, #datastore, #formatter, #output, #parsed_options, parsed_options=, #render, reset, #target, #tmp_directory, #user_interaction?

Instance Method Details

#cli_optionsObject



5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/interesting_findings.rb', line 5

def cli_options
  [
    OptChoice.new(
      ['--interesting-findings-detection MODE',
       'Use the supplied mode for the interesting findings detection. '],
      choices: %w[mixed passive aggressive],
      normalize: :to_sym
    )
  ]
end

#runObject



16
17
18
19
20
21
# File 'app/controllers/interesting_findings.rb', line 16

def run
  mode = parsed_options[:interesting_findings_detection] || parsed_options[:detection_mode]
  findings = target.interesting_findings(mode: mode)

  output('findings', findings: findings) unless findings.empty?
end