!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/process_ast/   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:     DOT_unparser.cpp (2.91 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
 *
 * Convert the phc AST to DOT format
 */

#include <iostream>

#include "cmdline.h"
#include "lib/demangle.h"
#include "lib/escape.h"

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

using namespace AST;
using namespace std;

extern struct gengetopt_args_info args_info;

DOT_unparser::DOT_unparser() 
{
    new_node_id = 0;
}

DOT_unparser::~DOT_unparser() 
{
}

void DOT_unparser::visit_php_script(PHP_script* in)
{
    cout << "/*" << endl;
    cout << " * AST in dot format generated by phc -- the PHP compiler" << endl;
    cout << " */" << endl << endl;
    cout << "digraph AST {" << endl;
    cout << "ordering=out;" << endl;

    Visitor::visit_php_script(in);

    cout << "}" << endl;
}

void DOT_unparser::pre_node(Node* in)
{
    new_node(demangle(in, false), in->get_line_number());
}

void DOT_unparser::post_node(Node* in)
{
    node_stack.pop();
}

void DOT_unparser::pre_identifier(Identifier* in)
{
    new_box(in->get_value_as_string());
}

void DOT_unparser::pre_literal(Literal* in)
{
    new_box(escape_DOT (in->get_source_rep()));
}

void DOT_unparser::visit_marker(char const* name, bool value)
{
    if(value)
    {
        cout << "node_" << new_node_id << " [label=\"" << name << "\", shape=plaintext]" << endl;
        add_link(new_node_id++);
    }
}

void DOT_unparser::visit_null(char const* name_space, char const* type_id)
{
    if(!args_info.no_dot_nulls_flag)
    {
        cout << "node_" << new_node_id << " [label=\"NULL\\n(" << type_id << ")\", shape=plaintext]" << endl;
        add_link(new_node_id++);
    }
}

void DOT_unparser::visit_null_list(char const* name_space, char const* type_id)
{
    if(!args_info.no_dot_nulls_flag)
    {
        cout << "node_" << new_node_id << " [label=\"NULL\\n(List<" << type_id << ">)\", shape=plaintext]" << endl;
        add_link(new_node_id++);
    }
}

void DOT_unparser::pre_list(char const* name_space, char const* type_id, int size)
{
    if(!args_info.no_dot_empty_lists_flag || size > 0)
    {
        stringstream s;
        s << "List<" << type_id << ">";
        new_node(s.str().c_str(), 0);
    }
}

void DOT_unparser::post_list(char const* name_space, char const* type_id, int size)
{
    if(!args_info.no_dot_empty_lists_flag || size > 0)
    {
        node_stack.pop();
    }
}

void DOT_unparser::new_node(char const* label, int line_number)
{
    cout << "node_" << new_node_id << " [label=\"" << label;
    if(!args_info.no_dot_line_numbers_flag && line_number != 0)
        cout << " (" << line_number << ")";
    cout << "\"];" << endl;    

    add_link(new_node_id);
    node_stack.push(new_node_id++);
}

void DOT_unparser::new_box(String* source_rep)
{
    if(source_rep)
        cout << "node_" << new_node_id << " [label=\"" << *source_rep << "\", shape=box]" << endl;
    else
        cout << "node_" << new_node_id << " [label=\"???\", shape=box]" << endl;
    add_link(new_node_id++);
}

void DOT_unparser::add_link(int target)
{
    if(!node_stack.empty())
        cout << "node_" << node_stack.top() << " -> node_" << target << ";" << endl;
}


:: 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.0044 ]--