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\Services; use App\Config\ps_constant; use Carbon\Carbon; ..
Decoded Output download
<?php
namespace App\Http\Services;
use App\Config\ps_constant;
use Carbon\Carbon;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Http;
use Modules\Core\Entities\ActivatedFileName;
use Modules\Core\Entities\Project;
use Modules\Core\Entities\SystemCode;
class PsCoreService
{
function checkPermission($ability = null, $model = null, $routeName = null, $msg = null)
{
goto UkWfQ;
RTlH8: yS5LM:
goto itEf5;
MCpHh:
return redirectView($routeName, $msg, "danger");
goto RTlH8;
ypE0f:
$msg = __("no_permission");
goto D4Zaj;
UkWfQ:
if (!($msg == null)) {
goto o9w0F;
}
goto ypE0f;
S7Btw:
if (!Gate::denies($ability, $model)) {
goto yS5LM;
}
goto MCpHh;
D4Zaj: o9w0F:
goto S7Btw;
itEf5:
}
public function getSystemCode()
{
goto v2qmY;
KM2Pn:
$code1 = Carbon::now();
goto pvPTR;
PGDs7:
$systemCode->code = base64_encode($installationDate . $code1 . "/n" . $code2);
goto fnd2H;
HE1eD:
$oldExploaded = explode("/n", base64_decode($old->code));
goto Ci2He;
lK51r:
if (empty($old)) {
goto HXuCj;
}
goto HE1eD;
cAvwc:
$installationDate = base64_decode($old->code);
goto KM2Pn;
pvPTR:
$code2 = Carbon::now()->addDays(ps_constant::freeTrialTotalDay);
goto KkIyA;
RYTbS: HXuCj:
goto g7wyR;
KkIyA:
$systemCode = SystemCode::first();
goto PGDs7;
FOodW:
return $code2FromNew;
goto RYTbS;
fnd2H:
$systemCode->update();
goto k1yqI;
H5wRI:
$allCodes = explode("/n", base64_decode($new->code));
goto mnLMw;
Ci2He:
if (!empty($oldExploaded[2])) {
goto Oxkgp;
}
goto cAvwc;
mnLMw:
$date = date_create($allCodes[2]);
goto b5mSa;
k1yqI: Oxkgp:
goto JQMgn;
JQMgn:
$new = SystemCode::first();
goto H5wRI;
b5mSa:
$code2FromNew = date_format($date, "M d, Y h:i:s");
goto FOodW;
v2qmY:
$old = SystemCode::first();
goto lK51r;
g7wyR:
}
public function updateLicense($request)
{
goto HRz0x;
pK3Rf:
$project->added_user_id = 1;
goto c1xj2;
vI_DY:
$project->project_url = $request->backend_url;
goto tK_qC;
amYRd: g1YYV:
goto vDbej;
v57eI:
$project->project_url = $request->backend_url;
goto pK3Rf;
Ywrpo:
if (empty($project)) {
goto JOnyN;
}
goto jMAqw;
AIXNb:
$project->project_code = $request->purchased_code;
goto v57eI;
Tl1wW:
goto BnhMs;
goto wUSbc;
Ya6UM: JOnyN:
goto Ky7o3;
HRz0x:
if (config("app.development")) {
goto tHWX5;
}
goto ooHTq;
Grv_Z:
goto g1YYV;
goto Ya6UM;
c1xj2:
$project->save();
goto amYRd;
IVQ6Q:
$response = '';
goto Tl1wW;
Ky7o3:
$project = new Project();
goto j_t62;
htTi2:
$message = checkPurchasedCode($response);
goto Zn2k3;
zeaGm: XibS5:
goto htTi2;
ldbWE:
$response = json_decode(Http::withHeaders(["Authorization" => config("app.envato_token_type") . " " . config("app.envato_token")])->get(ps_constant::envatoApiUri . ps_constant::envatoApiVersion . "/market/buyer/purchase?code=" . $purchaseCode));
goto zeaGm;
jMAqw:
$project->project_code = $request->purchased_code;
goto vI_DY;
hRS7c: tHWX5:
goto KX_qQ;
QlnKO:
$purchaseCode = $request->purchased_code;
goto ldbWE;
j_t62:
$project->project_name = "default";
goto AIXNb;
tHTDr:
$response = json_decode(file_get_contents(public_path("json/buyser-purchase-response.json"), true));
goto fGZCQ;
tK_qC:
$project->update();
goto Grv_Z;
Jo5rV:
$purchaseCode = $request->purchased_code;
goto NmcJ8;
KX_qQ:
$project = Project::first();
goto Ywrpo;
iTxQx:
return $message;
goto jQYMZ;
wUSbc: iNF1Z:
goto tHTDr;
oAGzA:
goto XibS5;
goto ZmstR;
Zn2k3:
if (empty($message)) {
goto ZR04d;
}
goto iTxQx;
ZmstR: c36sf:
goto QlnKO;
ooHTq:
if (App::environment("production")) {
goto c36sf;
}
goto Jo5rV;
fGZCQ: BnhMs:
goto oAGzA;
jQYMZ: ZR04d:
goto hRS7c;
NmcJ8:
if ($purchaseCode == "2aed1984-4f0e-480a-9d66-146959cfd75c") {
goto iNF1Z;
}
goto IVQ6Q;
vDbej:
}
public function activateLicense($request)
{
goto vZwfV;
Knv9f:
$project = Project::first();
goto ET5bz;
m3aPT:
$baseProjectObj = new \stdClass();
goto zRdDJ;
m5Of1:
$psLicenseCode = $decryptedKey[2];
goto G1NsM;
QLfZg:
$hasError = 0;
goto lteI6;
nlCMJ:
$dataFromJsonFileFromZip = json_decode($file);
goto Os8Tf;
Row1F:
$purchasedCode = $decryptedKey[1];
goto m5Of1;
YY_Wb:
$zip->open($zipFile);
goto NIZl6;
g9OG0:
$project->update();
goto c7fRj;
WRapt:
$logMessages[] = $baseProjectObj;
goto qRVTS;
r5Rel:
if (!empty($hasError)) {
goto Yzp7w;
}
goto Knv9f;
aCiuH:
$decryptedKey = explode("
", base64_decode($key));
goto ogzhD;
dPJoQ: VWPN0:
goto Sq_Kd;
rkqDO: foEIH:
goto FC5C_;
QOIFI:
if ($purchasedCode !== $oldDataOfProject->project_code) {
goto VWPN0;
}
goto vnNXv;
eLXa9:
if ($request->hasFile("zipFile")) {
goto foEIH;
}
goto NQHz2;
FC5C_:
$zipFile = $request->file("zipFile");
goto uvn3y;
aDaN5:
$activatedFileName->save();
goto AzxnL;
Os8Tf:
$key = $dataFromJsonFileFromZip->key;
goto ofHy2;
yksWG:
$logMessages[] = $domainObj;
goto M_Vcs;
wqSTv: IxgoZ:
goto Ie3Ln;
MkuPq:
$licenseObj->message = __("license_verify_fail");
goto rgiS1;
cdkMM:
$domainObj->status = "danger";
goto J3mFT;
wy3Zu:
$domainObj = new \stdClass();
goto wqL4x;
Fjkz2:
$activatedFileName->is_imported = 0;
goto aDaN5;
ofHy2:
$project = $dataFromJsonFileFromZip->project;
goto aCiuH;
M_Vcs:
++$hasError;
goto oLjPZ;
G1NsM:
$logMessages = [];
goto yjw1b;
c7fRj:
$activatedFileName = new ActivatedFileName();
goto mRLTL;
NIZl6:
$fileName = $zip->getNameIndex(0);
goto eitkW;
eZ8AW: c276z:
goto m3aPT;
kZeUr:
$logMessages[] = $domainObj;
goto Y5r0X;
ZDxMa:
$domainObj->message = __("domain_verify_success");
goto kZeUr;
uN3ic:
if ($project->base_project_id !== $oldDataOfProject->base_project_id) {
goto c276z;
}
goto m_ATO;
qz0LB: kxUUw:
goto r5Rel;
VE9lr:
$licenseObj->status = "danger";
goto MkuPq;
d93DY:
$licenseObj->message = __("license_verify_success");
goto n7ej2;
oLjPZ: YHba1:
goto QOIFI;
bnNIZ:
$baseProjectObj->message = __("base_proj_same");
goto WRapt;
RuUdf:
return $dataArr;
goto VcERW;
kwGHZ:
++$hasError;
goto cKRjZ;
cKRjZ: AK69S:
goto uN3ic;
iWgX1:
$dataArr = ["logMessages" => $logMessages, "hasError" => $hasError, "zipFileName" => $fileName];
goto RuUdf;
qRVTS:
goto kxUUw;
goto eZ8AW;
Sq_Kd:
$licenseObj = new \stdClass();
goto VE9lr;
n7ej2:
$logMessages[] = $licenseObj;
goto T_KJd;
rgiS1:
$logMessages[] = $licenseObj;
goto kwGHZ;
ewN6M:
$file = file_get_contents($fileName);
goto nlCMJ;
eitkW:
$zip->extractTo("./");
goto vYogn;
jS2Yb: Z9_qY:
goto ewN6M;
zRdDJ:
$baseProjectObj->status = "danger";
goto qdsVJ;
mRLTL:
$activatedFileName->file_name = $fileName;
goto Fjkz2;
m_ATO:
$baseProjectObj = new \stdClass();
goto mkRgk;
NQHz2:
$fileName = str_replace("zip", "json", $request->zipFile);
goto fmF6R;
uvn3y:
$zip = new \ZipArchive();
goto YY_Wb;
xbXnT:
$logMessages[] = $baseProjectObj;
goto kp1hq;
Y5r0X:
goto YHba1;
goto wqSTv;
wqL4x:
$domainObj->status = "success";
goto ZDxMa;
J3mFT:
$domainObj->message = __("domain_verify_fail");
goto yksWG;
wBOs7:
$licenseObj->status = "success";
goto d93DY;
ogzhD:
$backendUrl = $decryptedKey[0];
goto Row1F;
vYogn:
$zip->close();
goto jS2Yb;
vZwfV:
config("app.key", $request->key);
goto eLXa9;
yjw1b:
$oldDataOfProject = Project::first();
goto QLfZg;
kp1hq:
++$hasError;
goto qz0LB;
T_KJd:
goto AK69S;
goto dPJoQ;
fmF6R:
goto Z9_qY;
goto rkqDO;
lteI6:
if ($backendUrl !== $oldDataOfProject->project_url) {
goto IxgoZ;
}
goto wy3Zu;
Ie3Ln:
$domainObj = new \stdClass();
goto cdkMM;
vnNXv:
$licenseObj = new \stdClass();
goto wBOs7;
AzxnL: Yzp7w:
goto iWgX1;
ET5bz:
$project->ps_license_code = $psLicenseCode;
goto g9OG0;
qdsVJ:
$baseProjectObj->message = __("base_proj_not_same");
goto xbXnT;
mkRgk:
$baseProjectObj->status = "success";
goto bnNIZ;
VcERW:
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace App\Http\Services;
use App\Config\ps_constant;
use Carbon\Carbon;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Http;
use Modules\Core\Entities\ActivatedFileName;
use Modules\Core\Entities\Project;
use Modules\Core\Entities\SystemCode;
class PsCoreService
{
function checkPermission($ability = null, $model = null, $routeName = null, $msg = null)
{
goto UkWfQ;
RTlH8: yS5LM:
goto itEf5;
MCpHh:
return redirectView($routeName, $msg, "\x64\141\156\x67\x65\x72");
goto RTlH8;
ypE0f:
$msg = __("\156\x6f\x5f\x70\145\162\x6d\x69\x73\x73\151\x6f\x6e");
goto D4Zaj;
UkWfQ:
if (!($msg == null)) {
goto o9w0F;
}
goto ypE0f;
S7Btw:
if (!Gate::denies($ability, $model)) {
goto yS5LM;
}
goto MCpHh;
D4Zaj: o9w0F:
goto S7Btw;
itEf5:
}
public function getSystemCode()
{
goto v2qmY;
KM2Pn:
$code1 = Carbon::now();
goto pvPTR;
PGDs7:
$systemCode->code = base64_encode($installationDate . $code1 . "\x2f\x6e" . $code2);
goto fnd2H;
HE1eD:
$oldExploaded = explode("\57\156", base64_decode($old->code));
goto Ci2He;
lK51r:
if (empty($old)) {
goto HXuCj;
}
goto HE1eD;
cAvwc:
$installationDate = base64_decode($old->code);
goto KM2Pn;
pvPTR:
$code2 = Carbon::now()->addDays(ps_constant::freeTrialTotalDay);
goto KkIyA;
RYTbS: HXuCj:
goto g7wyR;
KkIyA:
$systemCode = SystemCode::first();
goto PGDs7;
FOodW:
return $code2FromNew;
goto RYTbS;
fnd2H:
$systemCode->update();
goto k1yqI;
H5wRI:
$allCodes = explode("\x2f\156", base64_decode($new->code));
goto mnLMw;
Ci2He:
if (!empty($oldExploaded[2])) {
goto Oxkgp;
}
goto cAvwc;
mnLMw:
$date = date_create($allCodes[2]);
goto b5mSa;
k1yqI: Oxkgp:
goto JQMgn;
JQMgn:
$new = SystemCode::first();
goto H5wRI;
b5mSa:
$code2FromNew = date_format($date, "\115\x20\144\54\40\131\40\x68\x3a\x69\72\x73");
goto FOodW;
v2qmY:
$old = SystemCode::first();
goto lK51r;
g7wyR:
}
public function updateLicense($request)
{
goto HRz0x;
pK3Rf:
$project->added_user_id = 1;
goto c1xj2;
vI_DY:
$project->project_url = $request->backend_url;
goto tK_qC;
amYRd: g1YYV:
goto vDbej;
v57eI:
$project->project_url = $request->backend_url;
goto pK3Rf;
Ywrpo:
if (empty($project)) {
goto JOnyN;
}
goto jMAqw;
AIXNb:
$project->project_code = $request->purchased_code;
goto v57eI;
Tl1wW:
goto BnhMs;
goto wUSbc;
Ya6UM: JOnyN:
goto Ky7o3;
HRz0x:
if (config("\x61\160\x70\x2e\x64\145\166\145\x6c\x6f\160\x6d\x65\156\164")) {
goto tHWX5;
}
goto ooHTq;
Grv_Z:
goto g1YYV;
goto Ya6UM;
c1xj2:
$project->save();
goto amYRd;
IVQ6Q:
$response = '';
goto Tl1wW;
Ky7o3:
$project = new Project();
goto j_t62;
htTi2:
$message = checkPurchasedCode($response);
goto Zn2k3;
zeaGm: XibS5:
goto htTi2;
ldbWE:
$response = json_decode(Http::withHeaders(["\x41\165\164\150\x6f\162\151\172\x61\x74\x69\157\x6e" => config("\x61\160\160\x2e\x65\x6e\166\x61\164\157\x5f\164\x6f\x6b\x65\x6e\137\164\171\x70\x65") . "\x20" . config("\x61\160\160\56\145\156\x76\x61\x74\x6f\x5f\164\x6f\x6b\145\156")])->get(ps_constant::envatoApiUri . ps_constant::envatoApiVersion . "\x2f\155\141\162\153\145\164\57\x62\x75\171\145\x72\x2f\160\x75\162\143\150\141\163\145\77\143\x6f\x64\x65\x3d" . $purchaseCode));
goto zeaGm;
jMAqw:
$project->project_code = $request->purchased_code;
goto vI_DY;
hRS7c: tHWX5:
goto KX_qQ;
QlnKO:
$purchaseCode = $request->purchased_code;
goto ldbWE;
j_t62:
$project->project_name = "\x64\x65\146\141\x75\154\164";
goto AIXNb;
tHTDr:
$response = json_decode(file_get_contents(public_path("\152\x73\x6f\x6e\57\x62\x75\171\x73\145\x72\55\x70\165\x72\x63\150\141\x73\145\x2d\x72\x65\163\160\x6f\156\x73\x65\x2e\x6a\163\157\x6e"), true));
goto fGZCQ;
tK_qC:
$project->update();
goto Grv_Z;
Jo5rV:
$purchaseCode = $request->purchased_code;
goto NmcJ8;
KX_qQ:
$project = Project::first();
goto Ywrpo;
iTxQx:
return $message;
goto jQYMZ;
wUSbc: iNF1Z:
goto tHTDr;
oAGzA:
goto XibS5;
goto ZmstR;
Zn2k3:
if (empty($message)) {
goto ZR04d;
}
goto iTxQx;
ZmstR: c36sf:
goto QlnKO;
ooHTq:
if (App::environment("\x70\162\157\144\165\143\164\151\x6f\156")) {
goto c36sf;
}
goto Jo5rV;
fGZCQ: BnhMs:
goto oAGzA;
jQYMZ: ZR04d:
goto hRS7c;
NmcJ8:
if ($purchaseCode == "\62\141\145\144\x31\x39\x38\64\55\64\x66\60\x65\55\x34\x38\x30\x61\x2d\x39\x64\66\x36\x2d\x31\64\x36\x39\65\x39\143\146\x64\x37\x35\143") {
goto iNF1Z;
}
goto IVQ6Q;
vDbej:
}
public function activateLicense($request)
{
goto vZwfV;
Knv9f:
$project = Project::first();
goto ET5bz;
m3aPT:
$baseProjectObj = new \stdClass();
goto zRdDJ;
m5Of1:
$psLicenseCode = $decryptedKey[2];
goto G1NsM;
QLfZg:
$hasError = 0;
goto lteI6;
nlCMJ:
$dataFromJsonFileFromZip = json_decode($file);
goto Os8Tf;
Row1F:
$purchasedCode = $decryptedKey[1];
goto m5Of1;
YY_Wb:
$zip->open($zipFile);
goto NIZl6;
g9OG0:
$project->update();
goto c7fRj;
WRapt:
$logMessages[] = $baseProjectObj;
goto qRVTS;
r5Rel:
if (!empty($hasError)) {
goto Yzp7w;
}
goto Knv9f;
aCiuH:
$decryptedKey = explode("\12", base64_decode($key));
goto ogzhD;
dPJoQ: VWPN0:
goto Sq_Kd;
rkqDO: foEIH:
goto FC5C_;
QOIFI:
if ($purchasedCode !== $oldDataOfProject->project_code) {
goto VWPN0;
}
goto vnNXv;
eLXa9:
if ($request->hasFile("\x7a\x69\160\x46\x69\x6c\x65")) {
goto foEIH;
}
goto NQHz2;
FC5C_:
$zipFile = $request->file("\x7a\151\x70\x46\151\154\x65");
goto uvn3y;
aDaN5:
$activatedFileName->save();
goto AzxnL;
Os8Tf:
$key = $dataFromJsonFileFromZip->key;
goto ofHy2;
yksWG:
$logMessages[] = $domainObj;
goto M_Vcs;
wqSTv: IxgoZ:
goto Ie3Ln;
MkuPq:
$licenseObj->message = __("\154\151\x63\145\156\x73\x65\137\x76\x65\162\151\146\x79\x5f\146\x61\151\x6c");
goto rgiS1;
cdkMM:
$domainObj->status = "\144\141\156\x67\x65\162";
goto J3mFT;
wy3Zu:
$domainObj = new \stdClass();
goto wqL4x;
Fjkz2:
$activatedFileName->is_imported = 0;
goto aDaN5;
ofHy2:
$project = $dataFromJsonFileFromZip->project;
goto aCiuH;
M_Vcs:
++$hasError;
goto oLjPZ;
G1NsM:
$logMessages = [];
goto yjw1b;
c7fRj:
$activatedFileName = new ActivatedFileName();
goto mRLTL;
NIZl6:
$fileName = $zip->getNameIndex(0);
goto eitkW;
eZ8AW: c276z:
goto m3aPT;
kZeUr:
$logMessages[] = $domainObj;
goto Y5r0X;
ZDxMa:
$domainObj->message = __("\144\x6f\x6d\141\x69\156\x5f\166\145\162\151\x66\x79\137\x73\x75\x63\x63\145\x73\x73");
goto kZeUr;
uN3ic:
if ($project->base_project_id !== $oldDataOfProject->base_project_id) {
goto c276z;
}
goto m_ATO;
qz0LB: kxUUw:
goto r5Rel;
VE9lr:
$licenseObj->status = "\144\x61\156\x67\145\162";
goto MkuPq;
d93DY:
$licenseObj->message = __("\x6c\x69\x63\145\x6e\163\x65\137\166\x65\162\x69\x66\171\x5f\163\x75\143\x63\145\163\163");
goto n7ej2;
oLjPZ: YHba1:
goto QOIFI;
bnNIZ:
$baseProjectObj->message = __("\x62\x61\x73\145\137\x70\x72\157\152\x5f\x73\141\155\145");
goto WRapt;
RuUdf:
return $dataArr;
goto VcERW;
kwGHZ:
++$hasError;
goto cKRjZ;
cKRjZ: AK69S:
goto uN3ic;
iWgX1:
$dataArr = ["\x6c\x6f\x67\115\x65\x73\x73\x61\147\145\163" => $logMessages, "\150\x61\163\105\x72\162\157\162" => $hasError, "\x7a\151\x70\106\x69\x6c\145\x4e\x61\155\x65" => $fileName];
goto RuUdf;
qRVTS:
goto kxUUw;
goto eZ8AW;
Sq_Kd:
$licenseObj = new \stdClass();
goto VE9lr;
n7ej2:
$logMessages[] = $licenseObj;
goto T_KJd;
rgiS1:
$logMessages[] = $licenseObj;
goto kwGHZ;
ewN6M:
$file = file_get_contents($fileName);
goto nlCMJ;
eitkW:
$zip->extractTo("\x2e\x2f");
goto vYogn;
jS2Yb: Z9_qY:
goto ewN6M;
zRdDJ:
$baseProjectObj->status = "\144\x61\156\x67\145\x72";
goto qdsVJ;
mRLTL:
$activatedFileName->file_name = $fileName;
goto Fjkz2;
m_ATO:
$baseProjectObj = new \stdClass();
goto mkRgk;
NQHz2:
$fileName = str_replace("\x7a\x69\x70", "\x6a\x73\157\156", $request->zipFile);
goto fmF6R;
uvn3y:
$zip = new \ZipArchive();
goto YY_Wb;
xbXnT:
$logMessages[] = $baseProjectObj;
goto kp1hq;
Y5r0X:
goto YHba1;
goto wqSTv;
wqL4x:
$domainObj->status = "\163\x75\x63\x63\x65\163\163";
goto ZDxMa;
J3mFT:
$domainObj->message = __("\144\157\x6d\x61\x69\x6e\x5f\166\x65\162\x69\x66\171\137\x66\141\151\x6c");
goto yksWG;
wBOs7:
$licenseObj->status = "\163\165\x63\143\x65\x73\163";
goto d93DY;
ogzhD:
$backendUrl = $decryptedKey[0];
goto Row1F;
vYogn:
$zip->close();
goto jS2Yb;
vZwfV:
config("\141\x70\160\56\x6b\145\171", $request->key);
goto eLXa9;
yjw1b:
$oldDataOfProject = Project::first();
goto QLfZg;
kp1hq:
++$hasError;
goto qz0LB;
T_KJd:
goto AK69S;
goto dPJoQ;
fmF6R:
goto Z9_qY;
goto rkqDO;
lteI6:
if ($backendUrl !== $oldDataOfProject->project_url) {
goto IxgoZ;
}
goto wy3Zu;
Ie3Ln:
$domainObj = new \stdClass();
goto cdkMM;
vnNXv:
$licenseObj = new \stdClass();
goto wBOs7;
AzxnL: Yzp7w:
goto iWgX1;
ET5bz:
$project->ps_license_code = $psLicenseCode;
goto g9OG0;
qdsVJ:
$baseProjectObj->message = __("\142\x61\x73\145\x5f\160\162\x6f\152\x5f\156\x6f\164\137\x73\141\155\145");
goto xbXnT;
mkRgk:
$baseProjectObj->status = "\163\165\143\x63\x65\163\163";
goto bnNIZ;
VcERW:
}
}
Function Calls
None |
Stats
MD5 | 2228e88810249cbfc82b2a298bc2a53d |
Eval Count | 0 |
Decode Time | 47 ms |