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.12 |
| on 2024-06-28 11:13:54 |
| GitHub: https://github.com/pk-fr/yakpro-po |
|__________________________________________________|
*/
namespace CookieBanner;
require_once 'lib/HTMLFilter.php';
require_once 'lib/RegexFilterBlackListEntry.php';
class CookieBanner
{
public $XzfqH;
public $RsjDm;
public function __construct(CookieBannerConfig $AAtPb, $AHBAT = null, $a0Nyo = false)
{
goto F0f9V;
F0f9V:
$this->XzfqH = $AAtPb;
goto RIjiW;
ZP6iU:
jO_39:
goto pct6E;
RIjiW:
$this->RsjDm = new CookieConsents($AAtPb, $AHBAT);
goto yPrlY;
oI3zM:
ob_start([$this, 'responseFilter']);
goto ZP6iU;
yPrlY:
if (!$a0Nyo) {
goto jO_39;
}
goto oI3zM;
pct6E:
}
public function responseFilter($YXCZq)
{
goto Q2K97;
CEQP2:
$dIPxq = preg_grep($L18m8, $bDNAm);
goto kLHnM;
FEivq:
cxmAG:
goto d9x1H;
G3EzT:
$meXrO = headers_list();
goto YDZQo;
d9x1H:
nNRd2:
goto uQOoF;
uQOoF:
$YXCZq = $this->filterHTMLString($YXCZq);
goto wG_US;
qcb3j:
return $YXCZq;
goto FEivq;
hOKnZ:
$uVGV3 = "/^content-type/i";
goto G3EzT;
Q2K97:
$L18m8 = "/text\/html|text\/plain|application\/xhtml\+xml/";
goto hOKnZ;
wG_US:
return $YXCZq;
goto E4bKA;
Re3Ap:
if (!(count($bDNAm) > 0)) {
goto nNRd2;
}
goto CEQP2;
kLHnM:
if (!(count($dIPxq) < 1)) {
goto cxmAG;
}
goto qcb3j;
YDZQo:
$bDNAm = preg_grep($uVGV3, $meXrO);
goto Re3Ap;
E4bKA:
}
public function filterHTMLString($J1yjU)
{
$NCfur = new HTMLFilter();
$this->j9fUQ();
if (!$this->XzfqH->injectHeader) {
return $NCfur->Rtn35($J1yjU, $this->v3npM(), $this->XzfqH);
}
$ftXql = "/<head.*?>/i";
preg_match($ftXql, $J1yjU, $yFV6o, PREG_OFFSET_CAPTURE);
$J1yjU = str_replace($yFV6o[0][0], $yFV6o[0][0] . $this->XzfqH->injectHeader, $J1yjU);
return $NCfur->Rtn35($J1yjU, $this->v3npM(), $this->XzfqH);
}
public function J9FuQ()
{
goto SRYXr;
SRYXr:
$xCBp5 = [];
goto rFk6h;
DF6mX:
bG1JD:
goto gtLmC;
EigoD:
header_remove("Set-Cookie");
goto q_DKj;
M62u5:
$Ne_BI = $this->V3Npm($xCBp5);
goto Qezi4;
Ij6HJ:
pGnys:
goto c_DGL;
BDiy6:
$bDNAm = preg_grep($H3xdM, headers_list());
goto EigoD;
A2bYw:
foreach ($this->XzfqH->consentCategories as $Isoti) {
goto AZvoe;
zuO5I:
ahA7h:
goto yAeO1;
AZvoe:
if (!$PesRy['consents'][$Isoti]) {
goto ahA7h;
}
goto PzuTZ;
yAeO1:
QT3JF:
goto CWwpn;
PzuTZ:
array_push($xCBp5, $Isoti);
goto zuO5I;
CWwpn:
}
goto Ij6HJ;
JfCLg:
setcookie($this->XzfqH->consentCookie . '_reloadOnAccept', '1');
goto DF6mX;
q_DKj:
$sAE0Z = false;
goto uTyPx;
AszqF:
$PesRy = json_decode(stripslashes($_COOKIE[$this->XzfqH->consentCookie]), true);
goto A2bYw;
c_DGL:
gTcfc:
goto M62u5;
rFk6h:
if (!isset($_COOKIE[$this->XzfqH->consentCookie])) {
goto gTcfc;
}
goto AszqF;
nPTyK:
op7_w:
goto n_Iuu;
Qezi4:
$H3xdM = "/Set-Cookie:([^=]*)/i";
goto BDiy6;
uTyPx:
foreach ($bDNAm as $cqaPk) {
goto MUD5H;
MUD5H:
$EaD0N = false;
goto rOXrF;
X0QGB:
DXQXR:
goto i2FdY;
i2FdY:
if ($EaD0N) {
goto MNl0c;
}
goto sQ_9t;
A0q7x:
MNl0c:
goto xieWd;
rOXrF:
preg_match($H3xdM, $cqaPk, $Kq8eM, PREG_OFFSET_CAPTURE);
goto GTe63;
GTe63:
$AoI1U = trim($Kq8eM[1][0]);
goto B4WO_;
sQ_9t:
header($cqaPk, false);
goto A0q7x;
B4WO_:
foreach ($Ne_BI['cookies'] as $QDpCx) {
goto rNlW2;
K7VWr:
$EaD0N = true;
goto bPogn;
bPogn:
goto DXQXR;
goto nZqNx;
rNlW2:
if (!($QDpCx->I_R3j($AoI1U, true) === true)) {
goto jW_vE;
}
goto rCF2b;
rCF2b:
$sAE0Z = true;
goto K7VWr;
nZqNx:
jW_vE:
goto iNDyO;
iNDyO:
Q1cO4:
goto j94Id;
j94Id:
}
goto X0QGB;
xieWd:
zokKY:
goto GSYBR;
GSYBR:
}
goto nPTyK;
n_Iuu:
if (!$sAE0Z) {
goto bG1JD;
}
goto JfCLg;
gtLmC:
}
public function v3nPM($eJkvJ = array())
{
goto h3svD;
h3svD:
$Ne_BI = ['cookies' => [], 'thirdParties' => [], 'iFrames' => []];
goto GcsMM;
GcsMM:
foreach (['cookies', 'thirdParties', 'iFrames'] as $bgH9B) {
goto sq6OF;
NJWYH:
aEU5w:
goto CPUdr;
sq6OF:
foreach ($this->XzfqH->blacklists[$bgH9B] as $f5M1E) {
goto UsWUg;
v3Xy5:
bs2Hv:
goto ClTTI;
UsWUg:
if (!array_diff($f5M1E["categories"], $eJkvJ)) {
goto bs2Hv;
}
goto fBIN1;
ClTTI:
YZUrg:
goto e89lq;
fBIN1:
$Ne_BI[$bgH9B][] = new RegexFilterBlackListEntry($f5M1E["filter"], $f5M1E["categories"]);
goto v3Xy5;
e89lq:
}
goto q5Ppr;
q5Ppr:
vQcPP:
goto NJWYH;
CPUdr:
}
goto Klw7O;
Klw7O:
RVfg3:
goto il7xK;
il7xK:
return $Ne_BI;
goto U4_gn;
U4_gn:
}
public function bVVnW($slg6d)
{
}
public function getBlockerJS()
{
$C_f4A = file_get_contents(__DIR__ . "/js/blocker.js");
return str_replace("@InsertBlockerConfig", addslashes(json_encode($this->V2jdN())), $C_f4A);
}
public function getBannerJS()
{
$C_f4A = file_get_contents(__DIR__ . "/js/banner.js");
return str_replace("@InsertBannerConfig", addslashes(json_encode($this->V2JDn())), $C_f4A);
}
private function V2jDn()
{
return array_merge((array) $this->XzfqH, ["defaultConsent" => (new CookieConsents($this->XzfqH, null))->eca4b]);
}
public function getHeadSnippet($Y6syk, $heG9Q)
{
goto B4ytX;
mMqW7:
$J4zzg = "<script type='text/javascript' src=\"{$heG9Q}?v={$LIAdd}\" defer></script>";
goto oZ7SO;
B4ytX:
$LIAdd = $this->XzfqH->version;
goto fHIFP;
fHIFP:
$i6WpJ = "<script type='text/javascript' src=\"{$Y6syk}?v={$LIAdd}\"></script>";
goto mMqW7;
oZ7SO:
return $i6WpJ . "
" . $J4zzg;
goto NFoXC;
NFoXC:
}
}
Did this file decode correctly?
Original Code
<?php
/* __________________________________________________
| Obfuscated by YAK Pro - Php Obfuscator 2.0.12 |
| on 2024-06-28 11:13:54 |
| GitHub: https://github.com/pk-fr/yakpro-po |
|__________________________________________________|
*/
namespace CookieBanner;
require_once 'lib/HTMLFilter.php';
require_once 'lib/RegexFilterBlackListEntry.php';
class CookieBanner
{
public $XzfqH;
public $RsjDm;
public function __construct(CookieBannerConfig $AAtPb, $AHBAT = null, $a0Nyo = false)
{
goto F0f9V;
F0f9V:
$this->XzfqH = $AAtPb;
goto RIjiW;
ZP6iU:
jO_39:
goto pct6E;
RIjiW:
$this->RsjDm = new CookieConsents($AAtPb, $AHBAT);
goto yPrlY;
oI3zM:
ob_start([$this, 'responseFilter']);
goto ZP6iU;
yPrlY:
if (!$a0Nyo) {
goto jO_39;
}
goto oI3zM;
pct6E:
}
public function responseFilter($YXCZq)
{
goto Q2K97;
CEQP2:
$dIPxq = preg_grep($L18m8, $bDNAm);
goto kLHnM;
FEivq:
cxmAG:
goto d9x1H;
G3EzT:
$meXrO = headers_list();
goto YDZQo;
d9x1H:
nNRd2:
goto uQOoF;
uQOoF:
$YXCZq = $this->filterHTMLString($YXCZq);
goto wG_US;
qcb3j:
return $YXCZq;
goto FEivq;
hOKnZ:
$uVGV3 = "/^content-type/i";
goto G3EzT;
Q2K97:
$L18m8 = "/text\\/html|text\\/plain|application\\/xhtml\\+xml/";
goto hOKnZ;
wG_US:
return $YXCZq;
goto E4bKA;
Re3Ap:
if (!(count($bDNAm) > 0)) {
goto nNRd2;
}
goto CEQP2;
kLHnM:
if (!(count($dIPxq) < 1)) {
goto cxmAG;
}
goto qcb3j;
YDZQo:
$bDNAm = preg_grep($uVGV3, $meXrO);
goto Re3Ap;
E4bKA:
}
public function filterHTMLString($J1yjU)
{
$NCfur = new HTMLFilter();
$this->j9fUQ();
if (!$this->XzfqH->injectHeader) {
return $NCfur->Rtn35($J1yjU, $this->v3npM(), $this->XzfqH);
}
$ftXql = "/<head.*?>/i";
preg_match($ftXql, $J1yjU, $yFV6o, PREG_OFFSET_CAPTURE);
$J1yjU = str_replace($yFV6o[0][0], $yFV6o[0][0] . $this->XzfqH->injectHeader, $J1yjU);
return $NCfur->Rtn35($J1yjU, $this->v3npM(), $this->XzfqH);
}
public function J9FuQ()
{
goto SRYXr;
SRYXr:
$xCBp5 = [];
goto rFk6h;
DF6mX:
bG1JD:
goto gtLmC;
EigoD:
header_remove("Set-Cookie");
goto q_DKj;
M62u5:
$Ne_BI = $this->V3Npm($xCBp5);
goto Qezi4;
Ij6HJ:
pGnys:
goto c_DGL;
BDiy6:
$bDNAm = preg_grep($H3xdM, headers_list());
goto EigoD;
A2bYw:
foreach ($this->XzfqH->consentCategories as $Isoti) {
goto AZvoe;
zuO5I:
ahA7h:
goto yAeO1;
AZvoe:
if (!$PesRy['consents'][$Isoti]) {
goto ahA7h;
}
goto PzuTZ;
yAeO1:
QT3JF:
goto CWwpn;
PzuTZ:
array_push($xCBp5, $Isoti);
goto zuO5I;
CWwpn:
}
goto Ij6HJ;
JfCLg:
setcookie($this->XzfqH->consentCookie . '_reloadOnAccept', '1');
goto DF6mX;
q_DKj:
$sAE0Z = false;
goto uTyPx;
AszqF:
$PesRy = json_decode(stripslashes($_COOKIE[$this->XzfqH->consentCookie]), true);
goto A2bYw;
c_DGL:
gTcfc:
goto M62u5;
rFk6h:
if (!isset($_COOKIE[$this->XzfqH->consentCookie])) {
goto gTcfc;
}
goto AszqF;
nPTyK:
op7_w:
goto n_Iuu;
Qezi4:
$H3xdM = "/Set-Cookie:([^=]*)/i";
goto BDiy6;
uTyPx:
foreach ($bDNAm as $cqaPk) {
goto MUD5H;
MUD5H:
$EaD0N = false;
goto rOXrF;
X0QGB:
DXQXR:
goto i2FdY;
i2FdY:
if ($EaD0N) {
goto MNl0c;
}
goto sQ_9t;
A0q7x:
MNl0c:
goto xieWd;
rOXrF:
preg_match($H3xdM, $cqaPk, $Kq8eM, PREG_OFFSET_CAPTURE);
goto GTe63;
GTe63:
$AoI1U = trim($Kq8eM[1][0]);
goto B4WO_;
sQ_9t:
header($cqaPk, false);
goto A0q7x;
B4WO_:
foreach ($Ne_BI['cookies'] as $QDpCx) {
goto rNlW2;
K7VWr:
$EaD0N = true;
goto bPogn;
bPogn:
goto DXQXR;
goto nZqNx;
rNlW2:
if (!($QDpCx->I_R3j($AoI1U, true) === true)) {
goto jW_vE;
}
goto rCF2b;
rCF2b:
$sAE0Z = true;
goto K7VWr;
nZqNx:
jW_vE:
goto iNDyO;
iNDyO:
Q1cO4:
goto j94Id;
j94Id:
}
goto X0QGB;
xieWd:
zokKY:
goto GSYBR;
GSYBR:
}
goto nPTyK;
n_Iuu:
if (!$sAE0Z) {
goto bG1JD;
}
goto JfCLg;
gtLmC:
}
public function v3nPM($eJkvJ = array())
{
goto h3svD;
h3svD:
$Ne_BI = ['cookies' => [], 'thirdParties' => [], 'iFrames' => []];
goto GcsMM;
GcsMM:
foreach (['cookies', 'thirdParties', 'iFrames'] as $bgH9B) {
goto sq6OF;
NJWYH:
aEU5w:
goto CPUdr;
sq6OF:
foreach ($this->XzfqH->blacklists[$bgH9B] as $f5M1E) {
goto UsWUg;
v3Xy5:
bs2Hv:
goto ClTTI;
UsWUg:
if (!array_diff($f5M1E["categories"], $eJkvJ)) {
goto bs2Hv;
}
goto fBIN1;
ClTTI:
YZUrg:
goto e89lq;
fBIN1:
$Ne_BI[$bgH9B][] = new RegexFilterBlackListEntry($f5M1E["filter"], $f5M1E["categories"]);
goto v3Xy5;
e89lq:
}
goto q5Ppr;
q5Ppr:
vQcPP:
goto NJWYH;
CPUdr:
}
goto Klw7O;
Klw7O:
RVfg3:
goto il7xK;
il7xK:
return $Ne_BI;
goto U4_gn;
U4_gn:
}
public function bVVnW($slg6d)
{
}
public function getBlockerJS()
{
$C_f4A = file_get_contents(__DIR__ . "/js/blocker.js");
return str_replace("@InsertBlockerConfig", addslashes(json_encode($this->V2jdN())), $C_f4A);
}
public function getBannerJS()
{
$C_f4A = file_get_contents(__DIR__ . "/js/banner.js");
return str_replace("@InsertBannerConfig", addslashes(json_encode($this->V2JDn())), $C_f4A);
}
private function V2jDn()
{
return array_merge((array) $this->XzfqH, ["defaultConsent" => (new CookieConsents($this->XzfqH, null))->eca4b]);
}
public function getHeadSnippet($Y6syk, $heG9Q)
{
goto B4ytX;
mMqW7:
$J4zzg = "<script type='text/javascript' src=\"{$heG9Q}?v={$LIAdd}\" defer></script>";
goto oZ7SO;
B4ytX:
$LIAdd = $this->XzfqH->version;
goto fHIFP;
fHIFP:
$i6WpJ = "<script type='text/javascript' src=\"{$Y6syk}?v={$LIAdd}\"></script>";
goto mMqW7;
oZ7SO:
return $i6WpJ . "\n" . $J4zzg;
goto NFoXC;
NFoXC:
}
}
Function Calls
None |
Stats
MD5 | 6afab8fcf9387d09d1e1bd879284aced |
Eval Count | 0 |
Decode Time | 57 ms |