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, #option_parser, option_parser=, #output, #render, reset, #target, #tmp_directory, #user_interaction?

Instance Method Details

#cli_optionsObject



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

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, advanced: true
    )
  ]
end

#runObject



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

def run
  mode = NS::ParsedCli.interesting_findings_detection || NS::ParsedCli.detection_mode
  findings = target.interesting_findings(mode: mode)

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