#!/usr/bin/perl -w use Crypt::RC4; use Getopt::Std; system('clear'); getopts('ed:', \%opts); if ($opts{e}) { print "Enter Passphrase: "; chomp ($passphrase = ); print "Enter Plaintext: "; chomp ($plaintext = ); $encrypted = RC4 ( $passphrase, $plaintext ); $passphrase = ""; print "Enter the file name to save to:"; chomp ($filename = ); print "Encrypting........\n"; open(FILE,">$filename"); print FILE $encrypted; close FILE or die "There was an error closing the file\n"; } elsif ($opts{d}) { print "option e not used\n"; } else{ print "Use -e to encrypt or -d to decrypt\n"; }