Created
December 9, 2011 19:30
-
-
Save acf/1452931 to your computer and use it in GitHub Desktop.
s/old.ip/new.ip/g in a DNSimple account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'dnsimple' | |
DNSimple::Client.username = '[email protected]' | |
DNSimple::Client.password = 'd34thst4r' | |
DNSimple::Client.debug = false | |
user = DNSimple::User.me | |
puts "#{user.domain_count} domains" | |
puts "Domains..." | |
DNSimple::Domain.all.each do |domain| | |
puts " #{domain.name}" | |
DNSimple::Record.all(domain).each do |record| | |
if record.content == "1.2.3.4" | |
puts "found type: #{record.record_type} name: #{record.name} content: #{record.content}" | |
record.content = "1.77.80.83" | |
record.save | |
end | |
end | |
end |
Oh yeah.
##
Excuse terseness and typos...Sent from my iPhone
…On 9 Dec 2011, at 14:50, Greg ***@***.*** wrote:
I hope these are fake account credentials you put in there...
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/1452931
Cool. Just making sure ;). That would have been a disastrous mistake. Thanks for the code.
"Uh, yeah, hi. This is RST Video calling. Customer number 4352, I'd like to place an order. Okay, I need one each of the following tapes..."
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I hope these are fake account credentials you put in there...