Skip to content

Instantly share code, notes, and snippets.

@kopertop
Last active October 3, 2017 14:46
Show Gist options
  • Save kopertop/94aa9aac2830dd5bdde79a7ea768f958 to your computer and use it in GitHub Desktop.
Save kopertop/94aa9aac2830dd5bdde79a7ea768f958 to your computer and use it in GitHub Desktop.
DNS zone file
// Hover.com "Zone file import/export" has been *Planned* since 2011
// https://help.hover.com/entries/471066-Zone-file-import-export
// Here's a brittle approximation of export.
//
// This is a modified version of the original hover-export.js to allow it to be used by a normal person (non-developer)
//
// 1. Add the following Bookmarklet to Chrome
// 2. login to your account: https://www.hover.com/domains
// 3. Go to the domain you want to export
// 4. Click on the HoverDump JS Bookmark
// 4a. If the popup is blocked, frist click to enable all popups from Hover, then repeat step 4
// 5. Copy the text content of the popup
javascript:var path_parts = document.location.pathname.split('/'); var domain = path_parts[path_parts.length-1]; $.ajax({ type:"GET", url:"/api/dns", success:function(response){ if (response.succeeded) { var entries = response.domains.find(function(d) { return d.domain_name === domain }).entries; var records = entries.map(function(e) { return [e.name, 'IN', e.type, e.content].join(' ') }); var result = "$TTL 900\n" + records.join("\n"); var win = window.open("", "Title", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=780, height=200, top="+(screen.height-400)+", left="+(screen.width-840)); win.document.body.innerHTML = "<b>" + domain + "</b><pre>" + result + "</pre>"; } }});
$TTL 900
@ IN TXT v=spf1 include:_spf.google.com ~all
@ IN MX 1 ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT1.ASPMX.L.GOOGLE.COM.
@ IN MX 5 ALT2.ASPMX.L.GOOGLE.COM.
@ IN MX 10 ASPMX2.GOOGLEMAIL.COM.
@ IN MX 10 ASPMX3.GOOGLEMAIL.COM.
blog IN CNAME toolbear74.wordpress.com.
mail IN CNAME ghs.google.com.
sites IN CNAME ghs.google.com.
docs IN CNAME ghs.google.com.
calendar IN CNAME ghs.google.com.
smtp IN CNAME smtp.gmail.com.
tim IN CNAME toolbear.github.io.
boxen IN CNAME toolbear-boxen.herokuapp.com.
@ IN A 192.30.252.153
@ IN A 192.30.252.154
@ IN TXT keybase-site-verification=pcgVuIGYAkz2Nu5_YeDbzsvG-YiWgi3Ryz9RMlsWMsU
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment