403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.146
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/StockAdjust/wp-content/plugins/insert-php-code-snippet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/StockAdjust/wp-content/plugins/insert-php-code-snippet/ajax-handler.php
<?php
if ( ! defined( 'ABSPATH' ) )
    exit;

add_action('wp_ajax_ips_backlink', 'xyz_ips_ajax_backlink');
add_action("wp_ajax_xyz_ips_execute_shortcode","xyz_ips_execute_shortcode");
function xyz_ips_execute_shortcode() {
    global $wpdb;

    $response = array(
        'status' => 0,
        'message' => 'Unexpected error',
        'data' => array()
    );
	

    try {
        if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'xyz_ips_execute_shortcode')) {
            $response['status'] = 0;
            $response['message'] = 'Invalid request. Please try again.';
        } else {

            $id =intval($_POST['id']);


            $shortcodeDetails = $wpdb->get_results($wpdb->prepare( "SELECT * FROM {$wpdb->prefix}xyz_ips_short_code WHERE id = %d AND insertionMethod = %d",$id, 3 ));
			if(!empty($shortcodeDetails))
			{
				$shortcode =$shortcodeDetails[0];
				$response['status'] = 1;
				$response['message'] = 'Success';
				$content_to_eval =xyz_ips_prepare_content_to_eval($shortcode->content);
				try {
				
					eval($content_to_eval);
					$response['message'] = 'You have successfully executed the code in background';
						} catch (Throwable $e) { 
							
							$response['status'] = 0;
							$response['message'] = 'Error: ' . $e->getMessage();
						}




			}
			else{
				$response['message'] ='Invalid snippet id';
			}
        }
    } catch (Exception $e) {
		
        $response['status'] = 0;
        $response['message'] = 'Error: ' . $e->getMessage();
    }

   

	
	wp_send_json($response);
    wp_die();
}
function xyz_ips_ajax_backlink() {

	check_ajax_referer('xyz-ips-blink','security');
    if(current_user_can('administrator')){
        global $wpdb;
        if(isset($_POST)){
            if(intval($_POST['enable'])==1){
                update_option('xyz_credit_link','ips');
                echo 1;
            }
            if(intval($_POST['enable'])==-1){
                update_option('xyz_ips_credit_dismiss','dis');
                echo -1;
            }
        }
    }die;
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit