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 /* __________________________________________________ | Obfuscated by YAK P..
Decoded Output download
<?php
/* __________________________________________________
| Obfuscated by YAK Pro - Php Obfuscator 2.0.14 |
| on 2022-09-30 06:29:58 |
| GitHub: https://github.com/pk-fr/yakpro-po |
|__________________________________________________|
*/
/*
* Copyright (C) Incevio Systems, Inc - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Munna Khan <[email protected]>, September 2018
*/
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 lEmKz;
}
$database = DB::connection()->getDatabaseName();
if (file_exists($database)) {
goto Ada_H;
}
touch($database);
DB::reconnect(Config::get("database.default"));
Ada_H:
$outputLog->write("Using SqlLite database: " . $database, 1);
lEmKz:
}
}
?>
Did this file decode correctly?
Original Code
<?php
/* __________________________________________________
| Obfuscated by YAK Pro - Php Obfuscator 2.0.14 |
| on 2022-09-30 06:29:58 |
| GitHub: https://github.com/pk-fr/yakpro-po |
|__________________________________________________|
*/
/*
* Copyright (C) Incevio Systems, Inc - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited
* Proprietary and confidential
* Written by Munna Khan <[email protected]>, September 2018
*/
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\x67\162\x61\x74\x65", ["\55\55\x66\157\162\143\x65" => true], $outputLog);
} catch (Exception $e) {
return $this->response($e->getMessage(), "\x65\x72\162\157\x72", $outputLog);
}
return $this->seed($outputLog);
}
private function seed($outputLog)
{
try {
Artisan::call("\x64\x62\x3a\x73\x65\145\x64", ["\55\55\146\157\162\143\145" => true], $outputLog);
Artisan::call("\151\156\x63\x65\166\151\157\72\x67\145\156\145\162\141\x74\x65\x2d\x6b\x65\x79", ["\x2d\55\x66\x6f\162\143\145" => true], $outputLog);
} catch (Exception $e) {
return $this->response($e->getMessage(), "\145\x72\x72\157\162", $outputLog);
}
return $this->response(trans("\x69\x6e\x73\x74\x61\154\154\x65\x72\x5f\x6d\x65\163\163\x61\147\x65\x73\x2e\146\151\156\x61\154\56\x66\151\156\x69\x73\150\x65\x64"), "\x73\165\x63\143\145\163\163", $outputLog);
}
public function seedDemoData()
{
ini_set("\x6d\x61\170\137\145\170\145\x63\165\164\151\x6f\156\x5f\164\x69\155\x65", 1200);
$outputLog = new BufferedOutput();
try {
Artisan::call("\x69\x6e\143\x65\166\x69\x6f\x3a\x64\145\x6d\157");
} catch (Exception $e) {
return $this->response($e->getMessage(), "\x65\x72\x72\157\162", $outputLog);
}
return $this->response(trans("\151\x6e\x73\x74\141\154\x6c\x65\x72\137\155\x65\163\163\141\147\x65\x73\56\146\x69\156\141\154\x2e\x66\151\x6e\151\163\x68\145\144"), "\x73\x75\x63\x63\x65\x73\163", $outputLog);
}
private function response($message, $status, $outputLog)
{
return ["\163\x74\141\164\165\x73" => $status, "\x6d\145\x73\163\141\147\145" => $message, "\144\x62\117\x75\164\x70\x75\x74\x4c\x6f\x67" => $outputLog->fetch()];
}
private function sqlite($outputLog)
{
if (!DB::connection() instanceof SQLiteConnection) {
goto lEmKz;
}
$database = DB::connection()->getDatabaseName();
if (file_exists($database)) {
goto Ada_H;
}
touch($database);
DB::reconnect(Config::get("\x64\x61\164\141\x62\x61\163\x65\x2e\144\145\x66\x61\165\x6c\x74"));
Ada_H:
$outputLog->write("\x55\163\x69\x6e\147\x20\x53\x71\154\x4c\151\164\145\x20\144\x61\164\x61\x62\141\x73\x65\72\40" . $database, 1);
lEmKz:
}
}
Function Calls
None |
Stats
MD5 | aef99979241c1d618265e9566a4b8f45 |
Eval Count | 0 |
Decode Time | 38 ms |