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
#!/usr/bin/env ruby | |
# ARPs for all the IPs aliased to this machine. | |
data = %x[ifconfig -a].split /\n\n/ | |
data.each do |block| | |
d = /(eth\d:\d+)\s+/.match(block) | |
a = /inet addr:(\d+\.\d+\.\d+\.\d+)/.match(block) |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'base32' | |
require 'openssl' | |
int = 30 | |
now = Time.now.to_i / int | |
key = Base32.decode File.read('secret.key').strip |
NewerOlder