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 // THIS IS FOR BACKWARDS COMPATABILITY ONLY! // // This file will be removed i..

Decoded Output download

<?php 
 
// THIS IS FOR BACKWARDS COMPATABILITY ONLY! 
//  
// This file will be removed in later versions of Blueprint to 
// give developers the time to move to the new location of the 
// extension library. 
 
 
 
 
 
namespace Pterodactyl\Services\Helpers; 
 
use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface; 
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService; 
 
class BlueprintExtensionLibrary 
{ 
  // Construct BlueprintExtensionLibrary 
  public function __construct( 
    private SettingsRepositoryInterface $settings, 
    private BlueprintPlaceholderService $placeholder, 
  ) { 
  } 
 
 
  /* 
  | Databasing 
  | 
  | dbGet("table", "record"); 
  | dbSet("table", "record", "value"); 
  */ 
  public function dbGet($table, $record) { 
    return $this->settings->get($table."::".$record); 
  } 
 
  public function dbSet($table, $record, $value) { 
    return $this->settings->set($table."::".$record, $value); 
  } 
 
 
  /* 
  | Notifications 
  | 
  | notify("text"); 
  | notifyAfter(delay, "text"); 
  | notifyNow("text"); 
  */ 
  public function notify($text) { 
    $this->dbSet("blueprint", "notification:text", $text); 
    shell_exec("cd ".escapeshellarg($this->placeholder->folder()).";echo ".escapeshellarg($text)." > .blueprint/extensions/blueprint/private/db/notification;"); 
    return; 
  } 
 
  public function notifyAfter($delay, $text) { 
    $this->dbSet("blueprint", "notification:text", $text); 
    shell_exec("cd ".escapeshellarg($this->placeholder->folder()).";echo ".escapeshellarg($text)." > .blueprint/extensions/blueprint/private/db/notification;"); 
    header("Refresh:$delay"); 
    return; 
  } 
 
  public function notifyNow($text) { 
    $this->dbSet("blueprint", "notification:text", $text); 
    shell_exec("cd ".escapeshellarg($this->placeholder->folder()).";echo ".escapeshellarg($text)." > .blueprint/extensions/blueprint/private/db/notification;"); 
    header("Refresh:0"); 
    return; 
  } 
 
 
  /* 
  | Files 
  |  
  | fileRead("path"); 
  | fileMake("path"); 
  | fileWipe("path"); 
  */ 
  public function fileRead($path) { 
    return shell_exec("cat ".escapeshellarg($path).";"); 
  } 
 
  public function fileMake($path) { 
    return shell_exec("touch ".escapeshellarg($path).";"); 
  } 
 
  public function fileWipe($path) { 
    return shell_exec("rm ".escapeshellarg($path).";"); 
  } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php

// THIS IS FOR BACKWARDS COMPATABILITY ONLY!
// 
// This file will be removed in later versions of Blueprint to
// give developers the time to move to the new location of the
// extension library.





namespace Pterodactyl\Services\Helpers;

use Pterodactyl\Contracts\Repository\SettingsRepositoryInterface;
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService;

class BlueprintExtensionLibrary
{
  // Construct BlueprintExtensionLibrary
  public function __construct(
    private SettingsRepositoryInterface $settings,
    private BlueprintPlaceholderService $placeholder,
  ) {
  }


  /*
  | Databasing
  |
  | dbGet("table", "record");
  | dbSet("table", "record", "value");
  */
  public function dbGet($table, $record) {
    return $this->settings->get($table."::".$record);
  }

  public function dbSet($table, $record, $value) {
    return $this->settings->set($table."::".$record, $value);
  }


  /*
  | Notifications
  |
  | notify("text");
  | notifyAfter(delay, "text");
  | notifyNow("text");
  */
  public function notify($text) {
    $this->dbSet("blueprint", "notification:text", $text);
    shell_exec("cd ".escapeshellarg($this->placeholder->folder()).";echo ".escapeshellarg($text)." > .blueprint/extensions/blueprint/private/db/notification;");
    return;
  }

  public function notifyAfter($delay, $text) {
    $this->dbSet("blueprint", "notification:text", $text);
    shell_exec("cd ".escapeshellarg($this->placeholder->folder()).";echo ".escapeshellarg($text)." > .blueprint/extensions/blueprint/private/db/notification;");
    header("Refresh:$delay");
    return;
  }

  public function notifyNow($text) {
    $this->dbSet("blueprint", "notification:text", $text);
    shell_exec("cd ".escapeshellarg($this->placeholder->folder()).";echo ".escapeshellarg($text)." > .blueprint/extensions/blueprint/private/db/notification;");
    header("Refresh:0");
    return;
  }


  /*
  | Files
  | 
  | fileRead("path");
  | fileMake("path");
  | fileWipe("path");
  */
  public function fileRead($path) {
    return shell_exec("cat ".escapeshellarg($path).";");
  }

  public function fileMake($path) {
    return shell_exec("touch ".escapeshellarg($path).";");
  }

  public function fileWipe($path) {
    return shell_exec("rm ".escapeshellarg($path).";");
  }
}

Function Calls

None

Variables

None

Stats

MD5 77ba7e1ee542fda8116a9a681ae1a492
Eval Count 0
Decode Time 71 ms