########################################################################### ## Copyright (C) Wizardry and Steamworks 2015 - License: GNU GPLv3 ## ########################################################################### #!/usr/bin/perl -w use Net::IP; open FILE, "<", $ARGV[0] or die "Could not open file peers file"; while () { $_ =~ /([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\-([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})/ || next; $ip = new Net::IP("$1 - $2"); print map {"$_\n"} $ip->find_prefixes(); }