Browse Source

add two more tools

lennylxx 10 years ago
parent
commit
d27ba6c8a7
2 changed files with 40 additions and 0 deletions
  1. 18 0
      tools/list-1e100-all.py
  2. 22 0
      tools/list-1e100.py

+ 18 - 0
tools/list-1e100-all.py

@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+
+import sys
+
+def main():
+    infile = open(sys.argv[1], 'r')
+    hosts = infile.readlines()
+
+    for line in hosts:
+        arr = line.split()
+        if len(arr) == 0:
+            continue
+        for k in range(0, 32):
+            print arr[1][:8] + '-in-x' + hex(k)[2:].zfill(2) + '.1e100.net' 
+
+if __name__ == '__main__':
+    main()
+

+ 22 - 0
tools/list-1e100.py

@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+import sys
+
+table = (
+'arn', 'atl', 'ber', 'bom', 'bud', 'del', 'den', 'dfw',
+'fra', 'ham', 'hkg', 'iad', 'kix', 'kul', 'lax', 'lga',
+'lhr', 'lis', 'maa', 'mad', 'mia', 'mil', 'mrs', 'muc',
+'nrt', 'nuq', 'ord', 'par', 'prg', 'qro', 'sea', 'sin',
+'sof', 'syd', 'yyz', 'zrh'
+)
+
+def main():
+    for iata in table:
+        for i in range(1, 40):
+            for j in range(1, 90):
+                print iata + str(i).zfill(2) + 's' + str(j).zfill(2) + '-in-'\
+                      'x' + '01.1e100.net'
+
+if __name__ == '__main__':
+    main()
+