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 namespace Pterodactyl\BlueprintFramework\Services\ConfigService; use Pterodactyl\Bl..

Decoded Output download

<?php

namespace Pterodactyl\BlueprintFramework\Services\ConfigService;
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService;

class BlueprintConfigService
{
  // Construct core
  public function __construct(
    private BlueprintPlaceholderService $PlaceholderService,
  ) {
  }

  public function config($item, $value): string|null {
    return shell_exec("cd ".escapeshellarg($this->PlaceholderService->folder()).";c$item=$value bash blueprint.sh -config");
  }

  public function latest(): string {
    $api_url = $this->PlaceholderService->api_url()."/api/latest";
    $context = stream_context_create([
      'http' => [
        'method' => 'GET',
        'header' => 'User-Agent: BlueprintFramework',
      ],
    ]);
    $response = file_get_contents($api_url, false, $context);
    if ($response) {
      $cleaned_response = preg_replace('/[[:^print:]]/', '', $response);
      $data = json_decode($cleaned_response, true);
      if (isset($data['name'])) {
        $latest_version = $data['name'];
        return "$latest_version";
      } else {
        return "Error";
      }
    } else {
      return "Error";
    }
  }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Pterodactyl\BlueprintFramework\Services\ConfigService;
use Pterodactyl\BlueprintFramework\Services\PlaceholderService\BlueprintPlaceholderService;

class BlueprintConfigService
{
  // Construct core
  public function __construct(
    private BlueprintPlaceholderService $PlaceholderService,
  ) {
  }

  public function config($item, $value): string|null {
    return shell_exec("cd ".escapeshellarg($this->PlaceholderService->folder()).";c$item=$value bash blueprint.sh -config");
  }

  public function latest(): string {
    $api_url = $this->PlaceholderService->api_url()."/api/latest";
    $context = stream_context_create([
      'http' => [
        'method' => 'GET',
        'header' => 'User-Agent: BlueprintFramework',
      ],
    ]);
    $response = file_get_contents($api_url, false, $context);
    if ($response) {
      $cleaned_response = preg_replace('/[[:^print:]]/', '', $response);
      $data = json_decode($cleaned_response, true);
      if (isset($data['name'])) {
        $latest_version = $data['name'];
        return "$latest_version";
      } else {
        return "Error";
      }
    } else {
      return "Error";
    }
  }
}

Function Calls

None

Variables

None

Stats

MD5 434d776c0e399174db0f2f618f610e26
Eval Count 0
Decode Time 85 ms