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, #target, #user_interaction?

Instance Method Details

#cli_optionsObject



5
6
7
8
9
10
11
12
13
14
15
# 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. ' \
       'Modes: mixed, passive, aggressive'
      ],
      choices: %w(mixed passive aggressive),
      normalize: :to_sym)
  ]
end

#runObject



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

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