home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl -w
- # This Script used the ACG Card-Reader to DUMP the RFID Chip Content
- # Copyright by L. Grunwald DN-Systems GmbH 2004
- use POSIX;
-
- if (@ARGV < 1) {
- print "rfdump the content of an RFID Ship useing serveral Card-Reader \n";
- print "Copyright 2004 by L. Grunwald DN-Systems GmbH\n";
- print "usage: rfdump.pl tty \n";
- print "e.g. rfdump.pl /dev/ttyS2\n";
- exit 1;
- }
- my $reader = $ARGV[0];
- open RFH,"+<".$reader or die "can┤t open $reader";
- print RFH "x";
- $tagtype="";
- $tagid="";
- while (<RFH>) {
- print RFH "s";
- chomp;
- if ((length $_)> 10) { $tagid=$_;
- &identtag;
- }
- $tagid="";
- }
- sub identtag{
- print "$tagid ";
- $tagtype=(substr($tagid,0,1 ));
- if ($tagtype eq 'V') {print "ISO 15693 ";
- $mfid=(substr($tagid,3,2));
- print "MFID: ".$mfid." ";
- if ($mfid == 0x02) {print "ST Microelectronics ";}
- elsif ($mfid == 0x04) {print "Phillips Semiconductors ";}
- elsif ($mfid == 0x05) {print "Infinion Technologies AG ";}
- elsif ($mfid == 0x07) {print "Texas Instruments ";}
- elsif ($mfid == 0x16 ) {print "EM Microelectronic-Marin SA ";}
- else {print "unknown ";}
- print "Serial: ".(substr($tagid,,5))."\n";}
- if ($tagtype eq 'T') {print "Tagit ";
- print "MFID: Texas Instruments ";
- print "Serial: ".$tagid."\n";}
- if ($tagtype eq 'I') {print "ICode ";
- print "MFID: Phillips Semiconductors ";
- print "Serial: ".$tagid."\n";
- print RFH "m".$tagid; }
- if ($tagtype eq 'M') {print "Mifare Ultralight or ISO 14443 Type A ";
- print "MFID: ".$mfid." ";
- print "Serial: ".$tagid."\n";}
- if ($tagtype eq 'S') {print "SR176 ";
- print "MFID: STM";
- print "Serial: ".$tagid."\n";}
- if ($tagtype eq 'Z') {print "ISO 14443 Type B ";
- print "MFID: ".$mfid." ";
- print "Serial: ".$tagid."\n";}
- }
-