• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Need help from pro/gurus/null-master

nullid

Active member
Trusted Uploader
Dec 18, 2019
233
89
28
Somewhere from ASIA
shoppy.gg
hello i need some help from all pro gurus null master here because im still in learning. how can i nulled this code? @Babak @NullMaster @TassieNZ @CyberDeviL @freenulled @TumharaBaap1995

PHP:
<?php

/**
* EnergyPlus Reactors
*
* Plugins for E+
*
* @since      1.1.0
* @package    EnergyPlus
* @subpackage EnergyPlus/framework
* @author     EN.ER.GY <[email protected]>
* */


if ( ! defined( 'ABSPATH' ) ) {
  exit; // Exit if accessed directly
}

class EnergyPlus_Reactors extends EnergyPlus {

  /**
  * Reactor list
  *
  * @return void
  */

  public static function reactors_list($id = false) {
    $list = array(

      'tweaks' => array(
        'id'          => 'tweaks',
        'title'       => __('Tweaks', 'energyplus'),
        'description' => __('Allows you to set up some additional features for Energy+', 'energyplus'),
        'details'     => __('Allows you to set up some additional features for Energy+ <br> <br>For example; you can adjust the size of the detail screen opened from the right, select which statuses will appear in the Orders panel, etc.', 'energyplus'),
        'active'      => 0,
        'order'       => 200,
        'badge'       => __('NEW', 'energyplus'),
        'url'         => false
      ),

      'dah' => array(
        'id'          => 'dah',
        'title'       => __('App Helper', 'energyplus'),
        'description' => __('Helps you create a desktop app to manage your store', 'energyplus'),
        'details'     => __('Helps you create a desktop app to manage your store', 'energyplus'),
        'active'      => 0,
        'order'       => 100,
        'badge'       => __('NEW', 'energyplus'),
        'url'         => 'Create now|//en.er.gy/plus/desktop-app-helper?v=1'
      )

    );

    if ($id) {
      return $list[$id];
    }

    return $list;
  }

  /**
  * Starts everything
  *
  * @return void
  */

  public static function run() {

    if (!EnergyPlus_Admin::is_admin(null)) {
      wp_die('Not allowed');
    }

    self::route();
  }

  /**
  * Router for sub pages
  *
  * @return void
  */

  private static function route()    {

    switch (EnergyPlus_Helpers::get('action')) {

      case 'settings':
      self::settings();
      break;

      case 'detail':
      self::detail();
      break;

      case 'activate':
      self::activate();
      break;

      case 'energy-activate':
      self::energy_activate();
      break;

      default:
      self::index();
      break;
    }
  }

  /**
  * Main function
  *
  * @return void
  */

  public static function index()    {

    $available = self::reactors_list();
    $counts    = array('active'=>0, 'inactive'=>0);
    $map       = EnergyPlus::option('reactors_list', array());

    foreach ($map AS $_map)    {

      if (isset($available[$_map['id']])) {
        $available[$_map['id']]['active'] = 1;
        $available[$_map['id']]['order'] = $available[$_map['id']]['order'] + 1000;
        ++$counts['active'];
      }
    }

    $counts['inactive'] = count($available) - $counts['active'];

    array_multisort(array_map(function($element) {
      return $element['order'];
    }, $available), SORT_DESC, $available);


    echo EnergyPlus_View::run('reactors/list',  array('all' => $available, 'counts'=>$counts ) );
  }


  public static function activate() {

    $id = sanitize_key(EnergyPlus_Helpers::get('id', 0));

    EnergyPlus_Helpers::ajax_nonce(true, $id);

    if (!isset( self::reactors_list()[$id] ) ) {
      wp_die('Not allowed');
    }

    $map = EnergyPlus::option('reactors_list', array());

    if ('deactivate' === EnergyPlus_Helpers::get('do')) {
      unset($map[$id]);

      $class = "Reactors__$id". "__" . $id;
      $class::deactivate();

    } else {
      $map[$id] = array('id' =>$id, 'date' => date('Y-m-d H:i:s'));
    }

    EnergyPlus::option('reactors_list', $map, 'set');

    wp_redirect( EnergyPlus_Helpers::admin_page('reactors', array('action'=>'detail', 'id' => $id, 'later'=>1 )));
  }



  /**
  * Details of reactor
  *
  * @return void
  */

  public static function detail()    {

    $id = sanitize_key(EnergyPlus_Helpers::get('id', 0));

    if (!isset( self::reactors_list()[$id] ) ) {
      wp_die('Not allowed');
    }

    if (!self::is_installed($id)) {
      self::needs();
      echo EnergyPlus_View::run('reactors/detail',  array( 'reactor'=>self::reactors_list($id) ) );
    } else {
      $class = "Reactors__$id". "__" . $id;
      $class::settings();
    }


  }

  public static function is_installed($id) {
    if (isset(EnergyPlus::option('reactors_list', array())[$id])) {
      return true;
    } else {
      return false;
    }
  }

  public static function needs() {
    $active = EnergyPlus::option('active', false);

    if ("1" === EnergyPlus_Helpers::get('later', "0")) {
      return true;
    }

    if (false === $active) {
      echo EnergyPlus_View::run('reactors/needs', array('step'=>0) );
      die;
    } else {
      $parts = explode(':', $active);
      $control = md5($parts[0].esc_url_raw(get_bloginfo('url')));
      if ($active !== $parts[0].":".$control.":".md5($control)) {
        echo EnergyPlus_View::run('reactors/needs', array('step'=>0) );
        die;
      }
    }
  }

  public static function energy_activate() {

    $step = 1;
    $response = "";

    if ($_POST) {

      if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'energyplus_reactors' ) ) {
        exit;
      }

      $data = array(
        'code' => sanitize_key(trim(EnergyPlus_Helpers::post('code', 0))),
        'url' => esc_url_raw(get_bloginfo('url'))
      );

      $response = wp_remote_post( 'https://en.er.gy/api/v1/activate', array(
        'method' => 'POST',
        'body' => $data
      )
    );

    if ( is_wp_error( $response ) ) {

      $step = 2;
      $response = esc_html__('Can not connect to activation server, please try again later');

    } else {

      $result = json_decode(sanitize_text_field($response['body']), true);

      if (!is_array($result)) {
        $step = 2;
        $response = esc_html__('Can not retrive a valid response from activation server, please try again later');
      } else {
        if (0 === $result['status']) {
          $step = 2;
          $response = sanitize_text_field($result['response']);
        } elseif (1 === $result['status']) {
          $step = 3;
          $response = sanitize_text_field($result['response']);

          if (strlen($response) === 32) {
            $key =  md5($data['code']).':'.md5(md5($data['code']).$data['url']).':'.sanitize_key($response);
            EnergyPlus::option('active', $key, 'set');
            wp_redirect( EnergyPlus_Helpers::admin_page('reactors', array('action'=>'detail', 'id' => EnergyPlus_Helpers::get('id', 'tweaks'), 'activated'=>1 )));
          }
        }
      }
    }


  }
  echo EnergyPlus_View::run('reactors/needs', array('step'=> 1, 'return' => $step, 'response'=>$response ) );

}
}
 
Code:
public static function energy_activate() {

    $step = 1;
    $response = "";

    if ($_POST) {

      if ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'energyplus_reactors' ) ) {
        exit;
      }

      $data = array(
        'code' => sanitize_key(trim(EnergyPlus_Helpers::post('code', 0))),
        'url' => esc_url_raw(get_bloginfo('url'))
      );

      $response = 200;

  

      $result = json_decode(sanitize_text_field($response['body']), true);
      $result['status'] = 1;
    
        if (0 === $result['status']) {
          $step = 2;
          $response = 200;
        } elseif (1 === $result['status']) {
          $step = 3;
          $response = 200;
          $response = array('code' => 'nulledversion', 'url' => '');
          
          
            $key =  md5($data['code']).':'.md5(md5($data['code']).$data['url']).':'.sanitize_key($response);
            EnergyPlus::option('active', $key, 'set');
            wp_redirect( EnergyPlus_Helpers::admin_page('reactors', array('action'=>'detail', 'id' => EnergyPlus_Helpers::get('id', 'tweaks'), 'activated'=>1 )));
          
        }
      
    
     }

  }
 
  • Like
Reactions: vfba
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock