Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6649139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:44:18+00:00 2026-05-26T00:44:18+00:00

I have a program that is encrypted with Blowfish in a file and a

  • 0

I have a program that is encrypted with Blowfish in a file and a second perl program that prompts for a passphrase that is used to decrypt it into a string, I would like to not have to write the decrypted source to the hard drive ever, although having it in memory isn’t really a problem as those running the program already know the source. I thought I might use eval but the program I need to run has a lot of input/output using Curses and stuff so eval wont work as it only returns the last value… Does anyone have any idea how this could be accomplished?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:44:19+00:00Added an answer on May 26, 2026 at 12:44 am

    You can use an @INC hook to perform the decryption. Then you can simply require or use the encrypted program. For example,

    # loader.pl
    use Crypt::Rot13;
    use File::Spec;
    sub decrypt_line {
        if ($_ ne '') {
            my ($self, $state) = @_;
            my ($crypt, $key) = @$state;
            $crypt->charge($_);
            ($_) = $crypt->rot13($key);
            return 1;
        }
    }
    sub load_crypt {
        my ($self, $filename) = @_;
        print "Key?\n";
        chomp(my $key = <STDIN>);
        for my $prefix (@INC) {
            open my $fh, '<', File::Spec->catfile($prefix, "$filename.r13") or next;
            return ($fh, \&decrypt_line, [Crypt::Rot13->new(), $key]);
        }
    }
    BEGIN {
        unshift @INC, \&load_crypt;
    }
    require 'hello.pl';
    
    # hello.pl.r13
    cevag "Uryyb, jbeyq!\a";
    
    $ perl loader.pl
    Key?
    13
    Hello, world!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program that reads server information from a configuration file and would
I have a PHP program that encrypts a PDF file into .xxx file this
I have a program in C++ that uses the cryptopp library to decrypt/encrypt messages.
We have a custom built program that needs authenticated/encrypted communication between a client and
I have program that has a variable that should never change. However, somehow, it
I have program that runs fast enough. I want to see the number of
I have a program that spits out both standard error and standard out, and
I have a program that creates a Windows user account using the NetUserAdd() API
I have a program that uses the mt19937 random number generator from boost::random. I
I have a program that spits out an Excel workbook in Excel 2003 XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.