Skip to content

Instantly share code, notes, and snippets.

@jonasschneider
Created August 28, 2012 20:56
Show Gist options
  • Save jonasschneider/3504294 to your computer and use it in GitHub Desktop.
Save jonasschneider/3504294 to your computer and use it in GitHub Desktop.
require 'dnsruby'
res = Dnsruby::Recursor.new Dnsruby::Resolver.new(nameserver: '8.8.8.8')
dlv_key = Dnsruby::RR.create("dlv.isc.org. IN DNSKEY 257 3 5 BEAAAAPHMu/5onzrEE7z1egmhg/WPO0+juoZrW3euWEn4MxDCE1+lLy2 brhQv5rN32RKtMzX6Mj70jdzeND4XknW58dnJNPCxn8+jAGl2FZLK8t+ 1uq4W+nnA3qO2+DL+k6BD4mewMLbIYFwe0PG73Te9fZ2kJb56dhgMde5 ymX4BI/oQ+cAK50/xvJv00Frf8kw6ucMTwFlgPe+jnGxPPEmHAte/URk Y62ZfkLoBAADLHQ9IrS2tryAe7mbBZVcOwIeU/Rw/mRx/vwwMCTgNboM QKtUdvNXDrYJDSHZws3xiRXF1Rf+al9UmZfSav/4NWLKjHzpT59k/VSt TDN0YUuWrBNh")
Dnsruby::Dnssec.add_dlv_key(dlv_key)
ret = res.query("sokrates.it.cx", "A")
puts "sokrates.it.cx security level: #{ret.security_level}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment