The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Net::Tor::Servers - Perl extension to query a Tor Directory and collect information on servers

SYNOPSIS

  use Net::Tor::Servers;
  
  my $torsrv = new Net::Tor::Servers;
  my @servers = $torsrv->getservers;
    
  for my $i (0..$#servers) {
    print "IP: $servers[$i][0], Name: $servers[$i][1], ORPort: $servers[$i][2], DirPort: $servers[$i][3]";
        if ($servers[$i][4]==1) {
                print " (Exit Node)\n";
        } else {
                print " (relay node)\n";
        }
  }

DESCRIPTION

This module was written to make life a little easier for me when I have been developing a dymanic blocklist for educational institutions to prevent students from being able to circumvent legally required content filtering systems.

Its nothing special, just a quick and easy way to get the data together in an array.

An alternative server and port can be specified:

  my @servers = $torsrv->getservers($server,$port);
  
  where $server is the IP / hostname of a Tor Directory Server, and $port is the port number.

SEE ALSO

N/A

AUTHOR

Andy Dixon, <ajdixon@cpan.org> www.andydixon.com

COPYRIGHT AND LICENSE

Copyright (C) 2011 by Andy Dixon

Thanks to Folkert van Heusden <a href='http://www.vanheusden.com'>www.vanheusden.com</a> for tor node type request and subsequent code change.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.