Parse::IASLog - A parser for Microsoft IAS-formatted log entries.
Function Interface:
use strict; use Data::Dumper; use Parse::IASLog; while (<>) { chomp; my $record = parse_ias( $_, enumerate => 0 ); next unless $record; print Dumper( $record ); }
Object Interface:
use strict; use Data::Dumper; use Parse::IASLog; my $ias = Parse::IASLog->new( enumerate => 0 ); while (<>) { chomp; my $record = $ias->parse( $_ ); next unless $record; print Dumper( $record ); }
Parse::IASLog provides a convenient way of parsing lines of text that are formatted in Microsoft Internet Authentication Service (IAS) log format, where attributes are logged as attribute-value pairs.
The parser takes lines of IAS-formatted text and returns on successful parsing a hashref record containing the applicable RADIUS attributes and values.
The module provides a perl implementation of the Iasparse tool.
Iasparse
Using the module automagically imports 'parse_ias' into your namespace.
parse_ias
Takes a string of IAS-formatted text as the first parameter. Subsequent parameter pairs are treated as options. See new() for full details regarding optional parameters. Returns a hashref on success or undef on failure. See below for the format of the hashref returned.
new
Creates a new Parse::IASLog object. Takes one optional parameter:
'enumerate', set to a false value to disable the enumeration of known attribute values, default is 1;
parse
Takes a string of IAS-formatted text. Returns a hashref on success or undef on failure.
The hashref will contain RADIUS attributes as keys. The following header attributes should always be present:
header
'NAS-IP-Address', The IP address of the NAS sending the request; 'User-Name', The user name that is requesting access; 'Record-Date', The date that the log was written; 'Record-Time', The time that the log was written; 'Service-Name', The name of the service that is running in the RADIUS server; 'Computer-Name', The name of the RADIUS server;
Chris BinGOs Williams <chris@bingosnet.co.uk>
BinGOs
Copyright © Chris Williams
This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl distribution for details.
http://technet.microsoft.com/en-us/network/bb643123.aspx
http://en.wikipedia.org/wiki/RADIUS
To install Parse::IASLog, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Parse::IASLog
CPAN shell
perl -MCPAN -e shell install Parse::IASLog
For more information on module installation, please visit the detailed CPAN module installation guide.