shell bypass 403

UnknownSec Shell

: /home/.cpan/build/JSON-4.11-0/t/ [ drwxr-xr-x ]
Uname: Linux dedi-15171674.espacofacial.com.br 5.14.0-687.36.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Aug 7 05:40:49 EDT 2026 x86_64
Software: Apache
PHP version: 8.2.33 [ PHP INFO ] PHP os: Linux
Server Ip: 172.67.154.186
Your Ip: 216.73.217.58
User: espa7358 (1004) | Group: espa7358 (1003)
Safe Mode: OFF
Disable Function:
NONE

name : 20_unknown.t
use strict;
use warnings;

use Test::More;
BEGIN { plan tests => 10 };
BEGIN { $ENV{PERL_JSON_BACKEND} ||= "JSON::backportPP"; }

use JSON;

my $json = JSON->new;

eval q| $json->encode( [ sub {} ] ) |;
ok( $@ =~ /encountered CODE/, $@ );

eval q|  $json->encode( [ \-1 ] ) |;
ok( $@ =~ /cannot encode reference to scalar/, $@ );

eval q|  $json->encode( [ \undef ] ) |;
ok( $@ =~ /cannot encode reference to scalar/, $@ );

eval q|  $json->encode( [ \{} ] ) |;
ok( $@ =~ /cannot encode reference to scalar/, $@ );

$json->allow_unknown;

is( $json->encode( [ sub {} ] ), '[null]' );
is( $json->encode( [ \-1 ] ),    '[null]' );
is( $json->encode( [ \undef ] ), '[null]' );
is( $json->encode( [ \{} ] ),    '[null]' );


$json->allow_unknown(0);

my $fh;
open( $fh, '>hoge.txt' ) or die $!;

eval q| $json->encode( [ $fh ] ) |;
ok( $@ =~ /encountered GLOB|cannot encode reference to scalar/, $@ );

$json->allow_unknown(1);

is( $json->encode( [ $fh ] ),    '[null]' );

close $fh;

unlink('hoge.txt');
© 2026 UnknownSec