!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/share/doc/libparse-recdescent-perl/examples/   drwxr-xr-x
Free 709.65 GB of 879.6 GB (80.68%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     demo_language.pl (2.57 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |

#SHARED SYMBOL_TABLE

my %symbol_table = ();

package Operation;

sub new
{
    my ($class, %args) = @_;
    bless \%args, $class;
}


package Assignment_Op; @ISA = qw( Operation );

sub eval
{
    my ($self) = @_;
    $symbol_table{$self->{var}->{name}}
        = $self->{value}->eval();
}


package Addition_Op; @ISA = qw ( Operation );

sub eval
{
    my ($self) = @_;
    return $self->{left}->eval() + $self->{right}->eval();
}


package Multiplication_Op; @ISA = qw ( Operation );

sub eval
{
    my ($self) = @_;
    return $self->{left}->eval() * $self->{right}->eval();
}


package IfThenElse_Op; @ISA = qw ( Operation );

sub eval
{
    my ($self) = @_;
    if ($self->{condition}->eval() )
    {
        return $self->{true_expr}->eval();
    }
    else
    {
        return $self->{false_expr}->eval();
    }
}


package LessThan_Op; @ISA = qw ( Operation );

sub eval
{
    my ($self) = @_;
    return $self->{left}->eval() < $self->{right}->eval();
}


package Value_Op; @ISA = qw( Operation );

sub eval
{
    my ($self) = @_;
    return $self->{value};
}


package Variable_Op; @ISA = qw( Operation );

sub eval
{
    my ($self) = @_;
    return $symbol_table{$self->{name}};
}

package Sequence_Op;

sub new
{
    my ($class, $list_ref) = @_;
    bless $list_ref, $class;
}

sub eval
{
    my ($self) = @_;
    my $last_val;
    foreach my $statement ( @$self )
    {
        $last_val = $statement->eval();
    }
    return $last_val;
}


package main;

use Parse::RecDescent;

my $grammar = q
{
    Script:        Statement(s) /^$/
                { Sequence_Op->new( $item[1] ) }

    Statement:    Assignment
         |    IfThenElse
         |    Expression
         |    <error>

    Assignment:    Variable '<-' Expression
                { Assignment_Op->new( var   => $item[1],
                           value => $item[3]) }

    Expression:    Product "+" Expression
                { Addition_Op->new( left  => $item[1],
                            right => $item[3] ) }
          |    Product

    Product:    Value "*" Product
                { Multiplication_Op->new( left  => $item[1],
                              right => $item[3] ) }
           |    Value

    Value:        /\d+/
                { Value_Op->new( value => $item[1] ) }
         |        Variable

    Variable:    /(?!if)[a-z]/
                { Variable_Op->new( name => $item[1] ); }

    IfThenElse:    'if' Condition 'then' Statement 'else' Statement
                { IfThenElse_Op->new( condition  => $item[2],
                              true_expr  => $item[4],
                              false_expr => $item[6]) }

    Condition:    Expression '<' Expression
                { LessThan_Op->new( left  => $item[1],
                            right => $item[3] ) }



};

my $parser = Parse::RecDescent->new($grammar)
    or die "Bad grammar";

local $/;
my $script = <DATA>;

my $tree = $parser->Script($script)
    or die "Bad script";

print $tree->eval();

__DATA__

a <- 1

b <- 2

if a<b then
    c <- 3
else
    c <- 99

b*c+a

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0227 ]--