Class: Ryo::Plugin::Subdomain::FindSubDomains
- Defined in:
- lib/ryo/plugin/subdomain/find_subdomains.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#discover, discover, #doc, #fetch_body, #initialize
Constructor Details
This class inherits a constructor from Ryo::Plugin::Subdomain::Base
Instance Method Details
#endpoint ⇒ Object
7 8 9 |
# File 'lib/ryo/plugin/subdomain/find_subdomains.rb', line 7 def endpoint "https://findsubdomains.com/subdomains-of" end |
#parse ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/ryo/plugin/subdomain/find_subdomains.rb', line 11 def parse table = doc.at_css("table#table-view") return [] if table.nil? table.css("tr")[1..-1].map do |row| cols = row.css("td") domain = cols.first.at_css("a")&.text&.strip ip = cols[1].at_css("a").nil? ? "N/A" : cols[1].at_css("a").text.strip { domain: domain, ip: ip } end end |