lib/ryo/plugin/shodan.rb in ryo-0.3.0 vs lib/ryo/plugin/shodan.rb in ryo-0.3.1
- old
+ new
@@ -14,14 +14,14 @@
def discover(ip)
ip == "N/A" ? { error: "Invalid IP" } : client.rest_api.host(ip)
end
def self.discover(ip)
- begin
- new.discover(ip)
- rescue ArgumentError => e
- { error: e.to_s }
- end
+ new.discover(ip)
+ rescue ArgumentError => e
+ { error: e.to_s }
+ rescue StandardError => e
+ { error: e.to_s }
end
end
end
end