Class: WPScan::Model::InterestingFinding
- Inherits:
-
Object
- Object
- WPScan::Model::InterestingFinding
- Includes:
- Finders::Finding, References
- Defined in:
- app/models/interesting_finding.rb
Overview
Interesting Finding base class.
Direct Known Subclasses
BackupDB, BackupFolder, ConfigBackup, DbExport, DebugLog, DuplicatorInstallerLog, EmergencyPwdResetScript, FantasticoFileslist, FullPathDisclosure, Headers, Media, MuPlugins, Multisite, PHPDisabled, Readme, Registration, RobotsTxt, SearchReplaceDB2, Timthumb, TmmDbMigrate, UploadDirectoryListing, UploadSQLDump, WPCron, XMLRPC
Constant Summary
Constants included from Finders::Finding
Finders::Finding::FINDING_OPTS
Instance Attribute Summary collapse
- #to_s ⇒ String
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #==(other) ⇒ Boolean
- #entries ⇒ Array<String>
-
#initialize(url, opts = {}) ⇒ InterestingFinding
constructor
A new instance of InterestingFinding.
- #type ⇒ String
Methods included from References
#cve_url, #cve_urls, #cves, #exploitdb_ids, #exploitdb_url, #exploitdb_urls, #msf_modules, #msf_url, #msf_urls, #packetstorm_ids, #packetstorm_url, #packetstorm_urls, #references, #references=, #references_urls, #securityfocus_ids, #securityfocus_url, #securityfocus_urls, #urls, #wpvulndb_ids, #wpvulndb_url, #wpvulndb_urls, #youtube_url, #youtube_urls
Methods included from Finders::Finding
#<=>, #confidence, #confidence=, #confirmed_by, #eql?, included, #interesting_entries, #parse_finding_options
Constructor Details
#initialize(url, opts = {}) ⇒ InterestingFinding
Returns a new instance of InterestingFinding.
17 18 19 20 21 22 |
# File 'app/models/interesting_finding.rb', line 17 def initialize(url, opts = {}) @url = url @to_s = opts[:to_s] (opts) end |
Instance Attribute Details
#to_s ⇒ String
34 35 36 |
# File 'app/models/interesting_finding.rb', line 34 def to_s @to_s || url end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
10 11 12 |
# File 'app/models/interesting_finding.rb', line 10 def url @url end |
Instance Method Details
#==(other) ⇒ Boolean
44 45 46 |
# File 'app/models/interesting_finding.rb', line 44 def ==(other) self.class == other.class && to_s == other.to_s end |
#entries ⇒ Array<String>
25 26 27 28 29 30 31 |
# File 'app/models/interesting_finding.rb', line 25 def entries res = WPScan::Browser.get(url) return [] unless res && res.headers['Content-Type'] =~ %r{\Atext/plain;}i res.body.split("\n").reject { |s| s.strip.empty? } end |
#type ⇒ String
39 40 41 |
# File 'app/models/interesting_finding.rb', line 39 def type @type ||= self.class.to_s.demodulize.underscore end |