Class: Koji::Plugins::PHPinfo
- Inherits:
-
Base
- Object
- Base
- Koji::Plugins::PHPinfo
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
Instance Method Details
#evidence_list ⇒ Object
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 || logo
end
end
|
#logo ⇒ Object
10
11
12
|
# File 'lib/koji/plugins/phpinfo.rb', line 10
def logo
website.doc&.at_css('img[alt="PHP Logo"]')
end
|
#score ⇒ Object
20
21
22
|
# File 'lib/koji/plugins/phpinfo.rb', line 20
def score
evidence_list.empty? ? 0 : 100
end
|
#title ⇒ Object
6
7
8
|
# File 'lib/koji/plugins/phpinfo.rb', line 6
def title
website.doc&.at_css("title")&.text == "phpinfo()"
end
|