patrikf's attack dns generator
authorJan Vales <jan@jvales.net>
Mon, 9 Mar 2015 15:24:24 +0000 (16:24 +0100)
committerJan Vales <jan@jvales.net>
Mon, 9 Mar 2015 16:08:09 +0000 (17:08 +0100)
gen.rb [new file with mode: 0755]

diff --git a/gen.rb b/gen.rb
new file mode 100755 (executable)
index 0000000..cd451da
--- /dev/null
+++ b/gen.rb
@@ -0,0 +1,17 @@
+#!/usr/bin/ruby
+
+OUR_TEAM = 265
+
+teams = (0..511).to_a
+teams.delete OUR_TEAM
+
+teams.each_with_index do |team, i|
+  puts
+  puts "; #{i}.attack ... team #{team}"
+  [2,3,4,5,6,7,8,10].each do |n|
+    dnsname = "#{n}.#{team}"
+    ip = [10, 60 + (team/256), team % 256, n].join(".")
+    puts [dnsname, "IN", "A", ip].join("\t")
+  end
+end
+