|  | 
 System Utilities / RadiusReport / Novell BMAS-preparserSource Text Note: Please patch RadiusReport 0.3b6 with this patch. (The reason for commenting out the Acct-Delay-Time correction is that the logfile I saw from the one example sent to me had silly numbers in this field) 
#!/usr/bin/perl
# Script to convert a logfiles produced by
# Novell BorderManager Authentication Services (BMAS) RADIUS
# into a standard "detail" file format suitable for RadiusReport.
# Remember to change RadiusReport to use the Ascend date format specification
#  $RECORD_DATE_FMT = "YEAR-MON-MDAY HH:MM:SS";
# Program copyright 2001, Paul Gregg 
# Unauthorised redistribution prohibited.
# http://www.pgregg.com
$first = "";
@associations = ();
while () {
  chomp;
  $cr = chr(13);
  s/$cr//ge;
  if ($first eq "") {
    $first = $_;
    @fields = split(/,/, $_);
    foreach $field (@fields) {
      $field =~ s/\"//g;
      push(@associations, $field);
    }
    $num_fields = $#associations + 1;
  } else {
  
    @fields = split(/,/, $_);
    foreach $field (@fields) { $field =~ s/\"//g; }
    printf ("%s %s\n", $fields[0], $fields[1]);
    for ($count=2; $count < $num_fields; $count++) {
      printf ("\t%s = %s\n", $associations[$count], $fields[$count])
      		if ($fields[$count] ne "");
    }
    print "\n";
  }
}
 |  | 
 
 |