
| Current Path : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/web-klick.de/dsh/50_dev2017/1300__perllib/ed.pl |
use Crypt::CBC;
use Crypt::Blowfish;
use MIME::Base64;
my $file = shift;
my $key1 = shift;
my $key2 = shift || $key1;
open(FFILE,"<".$file);
my $text = join("",<FFILE>);
close(FFILE);
if ($key1 and $text =~ s/^use +DivBasicF::IfTProgramReader\;\n *\n//s) {
$cipher1 = Crypt::CBC->new( -key => $key1, -cipher => 'Blowfish' );
$text1 = $cipher1->decrypt( decode_base64($text) );
exit if ($text1 !~ /package /);
open(FFILE,">".$file);
print FFILE $text1;
close(FFILE);
}
system("joe $file");
open(FFILE,"<".$file);
$text = join("",<FFILE>);
close(FFILE);
if ($key2) {
$cipher2 = Crypt::CBC->new( -key => $key2, -cipher => 'Blowfish' );
$text = encode_base64 ( $cipher2->encrypt($text) );
open(FFILE,">".$file);
print FFILE "use DivBasicF::IfTProgramReader;\n\n" . $text;
close(FFILE);
}