NAME

File::Scan - Perl extension for Scanning files for Viruses

SYNOPSIS

use File::Scan;

$fs = File::Scan->new([, OPTION ...]);
$fs->scan([FILE]);
if(my $e = $fs->error) { print "$e\n"; }

DESCRIPTION

This module is designed to allows users to scan files for known viruses. The purpose is to provide a perl module to make plataform independent virus scanners.

METHODS

new([, OPTION ...])

This method create a new File::Scan object. The following keys are available:

extension => 'string'

add the specified extension to the infected file

move => 'directory'

move the infected file to the specified directory

copy => 'directory'

copy the infected file to the specified directory

delete => 1

if the value set to 1 delete the infected file

max_txt_size => 'size in kbytes'

scan only the text file if the file size is less then max_txt_size. The default value is 5120 kbytes. Set to 0 for no limit.

max_bin_size => 'size in kbytes'

scan only the binary file if the file size is less then max_bin_size. The default value is 10240 kbytes. Set to 0 for no limit.

scan([FILE])

This method scan a file for viruses and return the name of virus if a virus is found.

skipped()

This method return 1 if the file was skipped and 0 if not.

error()

This method return a error message if a error happens.

AUTHOR

Henrique Dias <hdias@esb.ucp.pt>

CREDITS

Thanks to Rui de Castro, Sergio Castro and Ricardo Oliveira for the help.

Thanks to Fernando Martins for the personal collection of viruses.

SEE ALSO

perl(1).