The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Symantec::PCAnywhere::Profile::CIF - Encodes and decodes Symantec pcAnywhere connection profiles

SYNOPSIS

        use Symantec::PCAnywhere::Profile::CIF;
        
        # Load CIF file from file
        my $cif = new Symantec::PCAnywhere::Profile::CIF(filename => $filename);
        
        # Load CIF data directly
        my $cif = new Symantec::PCAnywhere::Profile::CIF(data => $data);
        
        my %results = $cif->get_attrs(
                CallerName,
                CallerPassword,
                DisplayName
        );
        while (my ($attr, $value) = each (%results)) {
                print "$attr\t= $value\n";
        }
        
        # Create an empty CIF
        my $cif = new Symantec::PCAnywhere::Profile::CIF;
        $cif->set_attrs(
                CallerName      => 'JohnDoe',
                CallerPassword  => 'acw938nrh!'
        );
        
        # Print the binary CIF file
        print $cif->encode;

DESCRIPTION

This module is responsible for decoding of a pcAnywhere .CIF file that describes a caller that can connect to a pcAnywhere Host. CIF files seem to always be the same size (10504 bytes), which is helpful for decoding.

See this module's base class (Symantec::PCAnywhere::Profile) for more information on the decoding mechanism.

VERSION

Version 0.06

METHODS

Here is the public API; see this module's base class documentation for more information on the inner workings of the encoding and decoding process, as well as additional useful methods.

new
        my $cif = new Symantec::PCAnywhere::Profile::CIF;
        my $cif = new Symantec::PCAnywhere::Profile::CIF(-filename => $filename);
        my $cif = new Symantec::PCAnywhere::Profile::CIF(filename => $filename);
        my $cif = new Symantec::PCAnywhere::Profile::CIF(-data => $cifdata);
        my $cif = new Symantec::PCAnywhere::Profile::CIF(data => $cifdata);

The "new" constructor takes any number of arguments and sets the appropriate flags internally before returning a new object. The arguments are considered as a list of key-value pairs which are inserted into the object data.

_decode_pca_file

Provided with XOR-encoded CIF data, un-obscure the whole thing into the "clear" format. The return value is the same length as the input string, but after XOR decoding.

_encode_pca_file

Provided with XOR-unencoded CIF data, obscure the whole thing into the "encrypted" format. The return value is the same length as the input string, but after XOR encoding.

SEE ALSO

This module is based very heavily on the work of Stephen Friedl at http://www.unixwiz.net/tools/pcainfo.html.

TO DO

Based on http://www.cpan.org/modules/00modlist.long.html#ID2_Guidelinesf, refactor code to pass references to lists instead of lists.

BUGS / CAVEATS

They're in there somewhere. Let me know what you find.

AUTHOR

Darren Kulp, <kulp@thekulp.com>, based on code from Stephen J. Friedl, (http://unixwiz.net/)

COPYRIGHT AND LICENSE

This code is in the public domain. Contains code placed in the public domain 2002 by Stephen Friedl.

"Symantec" and "pcAnywhere" are trademarks of Symantec Corp.