Hellos,
I'm trying to write a script to encrypt files (some text, some autocad some *.doc ect) prior to ftp'ing them to an outsourced firm we use. I've found the example below but it doesn't seem to be working.
Results:
Installed Modules:
Any Idea what I'm missing?
Thanks, Danzig
I'm trying to write a script to encrypt files (some text, some autocad some *.doc ect) prior to ftp'ing them to an outsourced firm we use. I've found the example below but it doesn't seem to be working.
Code:
use Crypt::CBC;
use FileHandle;
use strict;
open(CT,">c:\\test\\enc\\MouseOver-Status.Htm");
open(PT,"<c:\\test\\enc\\MouseOver-Status.Enc");
my $cipher = new Crypt::CBC({'key' => 'abc12345',
'cipher' => 'Blowfish_PP',
'padding' => 'space'});
undef $/;
print CT $cipher->encrypt(<PT>);
close(CT);
close(PT);
exit(0)
Results:
Code:
C:\Test\enc>dir /b
enc.pl
MouseOver-Status.Htm
C:\Test\enc>enc.pl
C:\Test\enc>dir /b
enc.pl
MouseOver-Status.Htm
C:\Test\enc>
Installed Modules:
Code:
ppm> query *
Querying target 1 (ActivePerl 5.8.6.811)
1. ActivePerl-DocTools [0.04] Perl extension for Documentation TOC Gene~
2. ActiveState-Relocat~ [0.03] Relocate a Perl installation
3. ActiveState-Rx [0.60] Regular Expression Debugger
4. Archive-Tar [1.22] Manipulates TAR archives
5. Compress-Zlib [1.33] Interface to zlib compression library
6. Crypt-CBC [2.12] Encrypt Data with Cipher Block Chaining M~
7. Crypt-DES [2.03] Perl DES encryption module
8. Crypt-DES_EDE3 [0.01] Triple-DES EDE encryption/decryption
9. Crypt-DES_EEE3 [0.01] Triple-DES EEE encryption/decryption
10. Crypt-DES_PP [1.00] Perl extension for DES encryption
11. Data-Dump [1.06] Pretty printing of data structures
12. Digest-HMAC [1.01] Keyed-Hashing for Message Authentication
13. Digest-MD2 [2.03] Perl interface to the MD2 Algorithm
14. Digest-MD5-M4p [0.01] Perl interface to a variant of the MD5 al~
15. Digest-SHA1 [2.10] Perl interface to the SHA-1 Algorithm
16. File-CounterFile [1.04] Persistent counter class
17. Font-AFM [1.19] Interface to Adobe Font Metrics files
18. HTML-Parser [3.38] HTML parser class
19. HTML-Tagset [3.03] Data tables useful in parsing HTML
20. HTML-Tree [3.18] build and scan parse-trees of HTML
21. IO-String [1.06] Is an IO::File compatible class that read~
22. IO-Zlib [1.04] IO:: style interface to Compress::Zlib
23. libwin32 [0.24] A collection of extensions that aims to p~
24. lib[URL unfurl="true"]www-perl[/URL] [5.801] Library for [URL unfurl="true"]WWW access[/URL] in Perl
25. MD5 [2.03] Perl interface to the MD5 Algorithm (obso~
26. PPM3 [3.1] Perl Package Manager: locate, install, up~
27. SOAP-Lite [0.55] Library for Simple Object Access Protocol~
28. Tk [804.027] A Graphical User Interface Toolkit
29. URI [1.35] Uniform Resource Identifiers (absolute an~
30. Win32-AuthenticateU~ [0.02] Win32 User authentication for domains
31. XML-Parser [2.34] A Perl module for parsing XML documents
32. XML-Simple [2.12] Easy API to read/write XML (esp config fi~
ppm>
Any Idea what I'm missing?
Thanks, Danzig