lib/apullo/fingerprints/domain.rb in apullo-0.1.5 vs lib/apullo/fingerprints/domain.rb in apullo-0.2.0
- old
+ new
@@ -1,8 +1,9 @@
# frozen_string_literal: true
require "resolv"
+require "uri"
require "whois-parser"
module Apullo
module Fingerprint
class Domain < Base
@@ -19,10 +20,13 @@
def build_results
{
dns: resources,
whois: contacts,
+ meta: {
+ links: links
+ }
}
end
def dns
@dns ||= Resolv::DNS.new
@@ -85,9 +89,19 @@
{
registrant_contacts: registrant_contacts,
admin_contacts: admin_contacts,
technical_contacts: technical_contacts
+ }
+ end
+
+ def securitytrails_link
+ target.domain? ? "https://securitytrails.com/domain/#{target.host}/dns" : "https://securitytrails.com/list/ip/#{target.host}"
+ end
+
+ def links
+ {
+ securitytrails: securitytrails_link
}
end
end
end
end