Пусть полежит здесь.
Нагуглился скрипт для расковыривания Cisco Catalyst VLAN.DAT:
#!/usr/bin/perl
# PROGRAM: vlan-dat-reader.pl
############################ Cisco VLAN.DAT viewer v.0.1b ##################################
#
# This program printig out VLAN numbers and names from VLAN.DAT file (Cisco Catalyst VLAN
# database file). This version tested on Catalyst 2950, 3550, 3560.
#
# On bugs report to Tikunov Andrey
# Golden Telecom (c) 2009
############################################################################################
use strict;
my $FileName;
my $record;
my $vlan_name;
my $vlan_number;
my $Delimiter;
if(scalar @ARGV == 1) {
$FileName=$ARGV[0];
}
else {
die "Usage: ./vlan-dat-reader.pl [VLAN.DAT-FILE]\n";
}
# Open vla.dat in binary mode
open(my $fh, "<$FileName") or die("ERROR: No such file or can't read it.\n");
binmode($fh);
# Set file reading position on 162 byte for reading first VLAN name
seek($fh, 161, 0) or die("ERROR: Short file (<162 byte).\n");
# Printing header
print "VLAN\tNAME\n----\t-------------------\n";
# Read 60-byte records in cycle while not EOF
until (eof($fh)){
# if we read 60 byte - unpacking VLAN data and printing out
if (read($fh, $record, 60) == 60) {
# Unpacking and printing out srings "VLAN NAME" if delimiter byte is 0xDC (or 220
# in decimal) - we consider it's right record
($vlan_name,$Delimiter,$vlan_number)=unpack('Z32x4C1n2', $record);
print "$vlan_number\t$vlan_name\n" if ($Delimiter == 220);
} #if
}# while
Результат выполнения:
Linux$ vlan-dat-reader.pl vlan.dat
VLAN NAME
---- -------------------
1 default
7 Mgmt
101 TEST1
102 TEST2
1002 fddi-default
1003 token-ring-default
1004 fddinet-default
1005 trnet-default
P.S.: Мопед не мой, я только нагуглил, проверить его не получилось. Сюда выкладываю, чтоб не потерять.
Источник:
http://a-monstr.livejournal.com/57400.html