Class: Yawast::Scanner::Plugins::Servers::Python

Inherits:
Object
  • Object
show all
Defined in:
lib/scanner/plugins/servers/python.rb

Class Method Summary collapse

Class Method Details

.check_banner(banner) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/scanner/plugins/servers/python.rb', line 8

def self.check_banner(banner)
  Yawast::Shared::Output.log_hash 'vulnerabilities',
                                  'python_version_exposed',
                                  {vulnerable: false, version: nil}

  # don't bother if this doesn't include Python
  return unless banner.include? 'Python/'

  Yawast::Utilities.puts_warn "Python Version: #{banner}"
  puts ''

  Yawast::Shared::Output.log_hash 'vulnerabilities',
                                  'python_version_exposed',
                                  {vulnerable: true, version: banner}
end