Class: Koji::Plugins::PHPinfo

Inherits:
Base
  • Object
show all
Defined in:
lib/koji/plugins/phpinfo.rb

Instance Attribute Summary

Attributes inherited from Base

#website

Instance Method Summary collapse

Methods inherited from Base

inherited, #initialize, #name, #report

Constructor Details

This class inherits a constructor from Koji::Plugins::Base

Instance Method Details

#evidence_listObject



14
15
16
17
18
# File 'lib/koji/plugins/phpinfo.rb', line 14

def evidence_list
  @evidence_list ||= [].tap do |out|
    out << "The website contains phpinfo" if title || 
  end
end

#logoObject



10
11
12
# File 'lib/koji/plugins/phpinfo.rb', line 10

def 
  website.doc&.at_css('img[alt="PHP Logo"]')
end

#scoreObject



20
21
22
# File 'lib/koji/plugins/phpinfo.rb', line 20

def score
  evidence_list.empty? ? 0 : 100
end

#titleObject



6
7
8
# File 'lib/koji/plugins/phpinfo.rb', line 6

def title
  website.doc&.at_css("title")&.text == "phpinfo()"
end