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 App\Http\Controllers\Installer\Helpers; use Exception; use Illuminate\Dat..

Decoded Output download

<?php 
namespace App\Http\Controllers\Installer\Helpers; use Exception; use Illuminate\Database\SQLiteConnection; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\DB; use Symfony\Component\Console\Output\BufferedOutput; class DatabaseManager { public function migrateAndSeed() { $outputLog = new BufferedOutput(); $this->sqlite($outputLog); return $this->migrate($outputLog); } private function migrate($outputLog) { try { Artisan::call("migrate", ["--force" => true], $outputLog); } catch (Exception $e) { return $this->response($e->getMessage(), "error", $outputLog); } return $this->seed($outputLog); } private function seed($outputLog) { try { Artisan::call("db:seed", ["--force" => true], $outputLog); Artisan::call("incevio:generate-key", ["--force" => true], $outputLog); } catch (Exception $e) { return $this->response($e->getMessage(), "error", $outputLog); } return $this->response(trans("installer_messages.final.finished"), "success", $outputLog); } public function seedDemoData() { ini_set("max_execution_time", 1200); $outputLog = new BufferedOutput(); try { Artisan::call("incevio:demo"); } catch (Exception $e) { return $this->response($e->getMessage(), "error", $outputLog); } return $this->response(trans("installer_messages.final.finished"), "success", $outputLog); } private function response($message, $status, $outputLog) { return ["status" => $status, "message" => $message, "dbOutputLog" => $outputLog->fetch()]; } private function sqlite($outputLog) { if (!DB::connection() instanceof SQLiteConnection) { goto edkl2; } $database = DB::connection()->getDatabaseName(); if (file_exists($database)) { goto cCDFK; } touch($database); DB::reconnect(Config::get("database.default")); cCDFK: $outputLog->write("Using SqlLite database: " . $database, 1); edkl2: } } 
 ?>

Did this file decode correctly?

Original Code

<?php
namespace App\Http\Controllers\Installer\Helpers; use Exception; use Illuminate\Database\SQLiteConnection; use Illuminate\Support\Facades\Artisan; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\DB; use Symfony\Component\Console\Output\BufferedOutput; class DatabaseManager { public function migrateAndSeed() { $outputLog = new BufferedOutput(); $this->sqlite($outputLog); return $this->migrate($outputLog); } private function migrate($outputLog) { try { Artisan::call("\x6d\151\147\x72\141\x74\145", ["\55\x2d\x66\157\162\x63\x65" => true], $outputLog); } catch (Exception $e) { return $this->response($e->getMessage(), "\145\x72\x72\157\x72", $outputLog); } return $this->seed($outputLog); } private function seed($outputLog) { try { Artisan::call("\144\142\x3a\x73\x65\145\x64", ["\x2d\55\146\157\x72\143\x65" => true], $outputLog); Artisan::call("\x69\x6e\143\x65\166\x69\x6f\72\x67\145\x6e\x65\162\141\x74\145\55\x6b\x65\171", ["\x2d\x2d\x66\x6f\162\143\145" => true], $outputLog); } catch (Exception $e) { return $this->response($e->getMessage(), "\145\x72\162\x6f\x72", $outputLog); } return $this->response(trans("\x69\x6e\163\x74\141\154\154\145\162\137\155\145\x73\163\141\x67\145\163\56\x66\x69\156\141\x6c\56\146\151\156\x69\163\x68\x65\x64"), "\x73\165\143\143\x65\x73\x73", $outputLog); } public function seedDemoData() { ini_set("\155\x61\x78\x5f\145\x78\145\x63\165\164\x69\157\x6e\137\x74\151\x6d\x65", 1200); $outputLog = new BufferedOutput(); try { Artisan::call("\151\156\x63\145\166\x69\157\72\144\x65\x6d\157"); } catch (Exception $e) { return $this->response($e->getMessage(), "\x65\162\x72\157\162", $outputLog); } return $this->response(trans("\151\x6e\x73\x74\x61\x6c\154\145\162\137\155\145\163\163\x61\147\x65\x73\56\146\151\x6e\x61\x6c\x2e\146\151\x6e\151\163\150\x65\x64"), "\163\165\x63\x63\145\x73\x73", $outputLog); } private function response($message, $status, $outputLog) { return ["\x73\164\x61\164\x75\163" => $status, "\155\x65\x73\163\141\x67\145" => $message, "\144\x62\117\165\x74\x70\165\164\x4c\157\x67" => $outputLog->fetch()]; } private function sqlite($outputLog) { if (!DB::connection() instanceof SQLiteConnection) { goto edkl2; } $database = DB::connection()->getDatabaseName(); if (file_exists($database)) { goto cCDFK; } touch($database); DB::reconnect(Config::get("\x64\x61\164\x61\142\x61\x73\x65\x2e\x64\x65\x66\141\165\154\x74")); cCDFK: $outputLog->write("\125\x73\x69\x6e\x67\40\x53\x71\x6c\x4c\151\164\145\x20\x64\x61\x74\141\x62\x61\x73\145\x3a\40" . $database, 1); edkl2: } }

Function Calls

None

Variables

None

Stats

MD5 54ec46a05d079bc582d099870df61d0f
Eval Count 0
Decode Time 60 ms