HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/share/doc/libfilter-perl/examples/decrypt/decr
#!/usr/bin/perl

# This script will decrypt a Perl script that has been encrypted using the
# "encrypt" script. It cannot decrypt any other kind of encrypted Perl script.
#
# Usage is decr file...
#

use strict;
use warnings;

use vars qw($XOR $BLOCKSIZE $HEADERSIZE $CRYPT_MAGIC_1 $CRYPT_MAGIC_2
            $size $mode $line $Fingerprint $file $block $sharp_bang $f
           ) ;   
$XOR             = 'Perl' ;
$BLOCKSIZE       = length $XOR ;
$HEADERSIZE      = 2 ;
$CRYPT_MAGIC_1   = 0xff ;
$CRYPT_MAGIC_2   = 0x00 ;
my $Version         = 1 ;
my $module_name     = 'Filter::decrypt' ;

my $Fingerprint     = pack ("C*", $CRYPT_MAGIC_1, $CRYPT_MAGIC_2) ;

die "Usage: decrypt file...\n"
  unless @ARGV ;


# Loop through each file in turn.
foreach $file (@ARGV)
{
    if (! -f $file)
    {
        print "Skipping directory $file\n" if -d $file ;
        #print "Skipping strange file $file\n" if ! -d $file ;
        next ;
    }

    open (F, "<", $file) || die "Cannot open $file: $!\n" ;
    binmode F;

    # skip the #! line
    $a = <F> ;
    if ($a =~ /^#!/)
    {
        $sharp_bang = $a ;
        $a = <F> ;
    }

    # skip "use decrypt;" line
    die "No use $module_name in $file\n"
        unless $a =~ /use\s+$module_name\s*;/ ;

    read(F, $f, length($Fingerprint)) || die "Cannot read from $file: $!\n" ;
    (print "skipping file '$file': not encrypted\n"), next
        unless $f eq $Fingerprint ;

    print "decrypting $file to $file.pd\n" ;
    open (O, ">", ${file}.".pd") || die "Cannot open ${file}.pd: $!\n" ;
    binmode O;
    print O $sharp_bang if $sharp_bang ;
    while ($size = read(F, $block, $BLOCKSIZE) )
    {
        print O ($block ^ substr($XOR, 0, $size)) ;
    }


    close F ;
    close O ;

}