Skip to content

Commit

Permalink
chore: add more rescue clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Sep 10, 2018
1 parent 77d475a commit 58d6bc8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ryo/plugin/shodan.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ def self.discover(ip)
new.discover(ip)
rescue ArgumentError => e
{ error: e.to_s }
rescue StandardError => e
{ error: e.to_s }
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/ryo/plugin/subdomain/find_subdomains.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def endpoint
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
Expand Down
2 changes: 2 additions & 0 deletions lib/ryo/plugin/tech.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ def self.discover(uri)
plugins.each do |name, plugin|
result = plugin.execute(target)
results[name] = result unless result.empty?
rescue StandardError => _
next
end
results
end
Expand Down

0 comments on commit 58d6bc8

Please sign in to comment.