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 "ipaddr" | |
require "nokogiri" | |
# Open XML file, get servers as an array cidr_list | |
cidr_list = [] | |
xml_doc = File.open(ARGV[0]) {|f| Nokogiri::XML(f)} | |
server_lines = xml_doc.xpath("//dict//array//string") | |
server_lines.each do |line| | |
data = line.text.split(",") | |
cidr = data[2] |
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 "ipaddr" | |
require "nokogiri" | |
# Open XML file, get servers as an array cidr_list | |
cidr_list = [] | |
xml_doc = File.open(ARGV[0]) {|f| Nokogiri::XML(f)} | |
server_lines = xml_doc.xpath("//dict//array//string") | |
server_lines.each do |line| | |
data = line.text.split(",") | |
cidr = data[2] |
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
0 89 0 0 0 | |
0 90 0 0 0 | |
0 91 0 0 0 | |
0 92 0 1 1 | |
0 93 0 1 1 | |
0 94 0 1 1 | |
0 95 0 2 2 | |
1 0 1 2 2 | |
1 1 1 3 3 | |
1 2 1 3 3 |
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 "ipaddr" | |
require "nokogiri" | |
sortedNets = [] | |
unSortedNets = [] | |
ARGV[0] = "test.plist" | |
# Open PLIST, get servers as an array cidr_list | |
cidr_list = [] |