namespace PHPMailer\PHPMailer;
${
"GLOBALS"
}
["njwxlkyadmxy"]="authUrl";
${
"GLOBALS"
}
["wtsudxyrdbfb"]="options";
${
"GLOBALS"
}
["eewjkakx"]="provider";
${
"GLOBALS"
}
["axwtuebovrmn"]="params";
${
"GLOBALS"
}
["xtjypi"]="redirectUri";
${
"GLOBALS"
}
["hggtsllfrfai"]="clientSecret";
${
"GLOBALS"
}
["ymahevdv"]="clientId";
${
"GLOBALS"
}
["hpicfxttih"]="providerName";
${
"GLOBALS"
}
["jtbogesllwp"]="provider";
$astyxhxhx="provider";
use League\OAuth2\Client\Provider\Google;
$gbxhbfwa="params";
use Hayageek\OAuth2\Client\Provider\Yahoo;
use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
if(!isset($_GET["code"])&&!isset($_GET["provider"])){
echo "<html>\n<body>Select Provider:<br/>\n<a href='?provider=Google'>Google</a><br/>\n<a href='?provider=Yahoo'>Yahoo</a><br/>\n<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br/>\n</body>\n</html>\n";
exit;
}
require"vendor/autoload.php";
$lerikr="provider";
$fcwhimr="providerName";
session_start();
${
${
"GLOBALS"
}
["hpicfxttih"]
}
="";
$feaqqko="options";
$bjmrik="options";
if(array_key_exists("provider",$_GET)){
${
"GLOBALS"
}
["ntvohjadf"]="providerName";
${
${
"GLOBALS"
}
["hpicfxttih"]
}
=$_GET["provider"];
$_SESSION["provider"]=${
${
"GLOBALS"
}
["ntvohjadf"]
};
}
elseif(array_key_exists("provider",$_SESSION)){
${
${
"GLOBALS"
}
["hpicfxttih"]
}
=$_SESSION["provider"];
}
if(!in_array(${
$fcwhimr
}
,["Google","Microsoft","Yahoo"])){
exit("Only Google, Microsoft and Yahoo OAuth2 providers are currently supported in this script.");
}
${
"GLOBALS"
}
["yneesm"]="clientSecret";
${
${
"GLOBALS"
}
["ymahevdv"]
}
="RANDOMCHARS-----duv1n2.apps.googleusercontent.com";
${
${
"GLOBALS"
}
["hggtsllfrfai"]
}
="RANDOMCHARS-----lGyjPcRtvP";
${
${
"GLOBALS"
}
["xtjypi"]
}
=(isset($_SERVER["HTTPS"])?"https://":"http://").$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"];
${
${
"GLOBALS"
}
["axwtuebovrmn"]
}
=["clientId"=>${
${
"GLOBALS"
}
["ymahevdv"]
}
,"clientSecret"=>${
${
"GLOBALS"
}
["yneesm"]
}
,"redirectUri"=>${
${
"GLOBALS"
}
["xtjypi"]
}
,"accessType"=>"offline"];
${
$bjmrik
}
=[];
${
${
"GLOBALS"
}
["jtbogesllwp"]
}
=null;
switch(${
${
"GLOBALS"
}
["hpicfxttih"]
}
){
case"Google":${
${
"GLOBALS"
}
["eewjkakx"]
}
=new Google(${
$gbxhbfwa
}
);
${
$feaqqko
}
=["scope"=>["https://mail.google.com/"]];
break;
case"Yahoo":${
$astyxhxhx
}
=new Yahoo(${
${
"GLOBALS"
}
["axwtuebovrmn"]
}
);
break;
case"Microsoft":${
$lerikr
}
=new Microsoft(${
${
"GLOBALS"
}
["axwtuebovrmn"]
}
);
${
${
"GLOBALS"
}
["wtsudxyrdbfb"]
}
=["scope"=>["wl.imap","wl.offline_access"]];
break;
}
if(null===${
${
"GLOBALS"
}
["eewjkakx"]
}
){
exit("Provider missing");
}
if(!isset($_GET["code"])){
${
"GLOBALS"
}
["rhjeem"]="authUrl";
${
${
"GLOBALS"
}
["njwxlkyadmxy"]
}
=$provider->getAuthorizationUrl(${
${
"GLOBALS"
}
["wtsudxyrdbfb"]
}
);
$_SESSION["oauth2state"]=$provider->getState();
header("Location: ".${
${
"GLOBALS"
}
["rhjeem"]
}
);
exit;
}
elseif(empty($_GET["state"])||($_GET["state"]!==$_SESSION["oauth2state"])){
unset($_SESSION["oauth2state"]);
unset($_SESSION["provider"]);
exit("Invalid state");
}
else{
${
"GLOBALS"
}
["douqgjptmgd"]="token";
unset($_SESSION["provider"]);
${
${
"GLOBALS"
}
["douqgjptmgd"]
}
=$provider->getAccessToken("authorization_code",["code"=>$_GET["code"]]);
echo"Refresh Token: ",$token->getRefreshToken();
}
namespace PHPMailer\PHPMailer;
${
"GLOBALS"
}
["njwxlkyadmxy"]="authUrl";
${
"GLOBALS"
}
["wtsudxyrdbfb"]="options";
${
"GLOBALS"
}
["eewjkakx"]="provider";
${
"GLOBALS"
}
["axwtuebovrmn"]="params";
${
"GLOBALS"
}
["xtjypi"]="redirectUri";
${
"GLOBALS"
}
["hggtsllfrfai"]="clientSecret";
${
"GLOBALS"
}
["ymahevdv"]="clientId";
${
"GLOBALS"
}
["hpicfxttih"]="providerName";
${
"GLOBALS"
}
["jtbogesllwp"]="provider";
use League\OAuth2\Client\Provider\Google;
use Hayageek\OAuth2\Client\Provider\Yahoo;
use Stevenmaguire\OAuth2\Client\Provider\Microsoft;
if(!isset($_GET["code"])&&!isset($_GET["provider"])){
echo "<html>\n<body>Select Provider:<br/>\n<a href='?provider=Google'>Google</a><br/>\n<a href='?provider=Yahoo'>Yahoo</a><br/>\n<a href='?provider=Microsoft'>Microsoft/Outlook/Hotmail/Live/Office365</a><br/>\n</body>\n</html>\n";
exit;
}
require"vendor/autoload.php";
session_start();
${
${
"GLOBALS"
}
["hpicfxttih"]
}
="";
if(array_key_exists("provider",$_GET)){
${
"GLOBALS"
}
["ntvohjadf"]="providerName";
${
${
"GLOBALS"
}
["hpicfxttih"]
}
=$_GET["provider"];
$_SESSION["provider"]=${
${
"GLOBALS"
}
["ntvohjadf"]
};
}
elseif(array_key_exists("provider",$_SESSION)){
${
${
"GLOBALS"
}
["hpicfxttih"]
}
=$_SESSION["provider"];
}
if(!in_array(${
"providerName"
}
,["Google","Microsoft","Yahoo"])){
exit("Only Google, Microsoft and Yahoo OAuth2 providers are currently supported in this script.");
}
${
"GLOBALS"
}
["yneesm"]="clientSecret";
${
${
"GLOBALS"
}
["ymahevdv"]
}
="RANDOMCHARS-----duv1n2.apps.googleusercontent.com";
${
${
"GLOBALS"
}
["hggtsllfrfai"]
}
="RANDOMCHARS-----lGyjPcRtvP";
${
${
"GLOBALS"
}
["xtjypi"]
}
=(isset($_SERVER["HTTPS"])?"https://":"http://").$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"];
${
${
"GLOBALS"
}
["axwtuebovrmn"]
}
=["clientId"=>${
${
"GLOBALS"
}
["ymahevdv"]
}
,"clientSecret"=>${
${
"GLOBALS"
}
["yneesm"]
}
,"redirectUri"=>${
${
"GLOBALS"
}
["xtjypi"]
}
,"accessType"=>"offline"];
${
"options"
}
=[];
${
${
"GLOBALS"
}
["jtbogesllwp"]
}
=null;
switch(${
${
"GLOBALS"
}
["hpicfxttih"]
}
){
case"Google":${
${
"GLOBALS"
}
["eewjkakx"]
}
=new Google(${
"params"
}
);
${
"options"
}
=["scope"=>["https://mail.google.com/"]];
break;
case"Yahoo":${
"provider"
}
=new Yahoo(${
${
"GLOBALS"
}
["axwtuebovrmn"]
}
);
break;
case"Microsoft":${
"provider"
}
=new Microsoft(${
${
"GLOBALS"
}
["axwtuebovrmn"]
}
);
${
${
"GLOBALS"
}
["wtsudxyrdbfb"]
}
=["scope"=>["wl.imap","wl.offline_access"]];
break;
}
if(null===${
${
"GLOBALS"
}
["eewjkakx"]
}
){
exit("Provider missing");
}
if(!isset($_GET["code"])){
${
"GLOBALS"
}
["rhjeem"]="authUrl";
${
${
"GLOBALS"
}
["njwxlkyadmxy"]
}
=$provider->getAuthorizationUrl(${
${
"GLOBALS"
}
["wtsudxyrdbfb"]
}
);
$_SESSION["oauth2state"]=$provider->getState();
header("Location: ".${
${
"GLOBALS"
}
["rhjeem"]
}
);
exit;
}
elseif(empty($_GET["state"])||($_GET["state"]!==$_SESSION["oauth2state"])){
unset($_SESSION["oauth2state"]);
unset($_SESSION["provider"]);
exit("Invalid state");
}
else{
${
"GLOBALS"
}
["douqgjptmgd"]="token";
unset($_SESSION["provider"]);
${
${
"GLOBALS"
}
["douqgjptmgd"]
}
=$provider->getAccessToken("authorization_code",["code"=>$_GET["code"]]);
echo"Refresh Token: ",$token->getRefreshToken();
}
© 2023 Quttera Ltd. All rights reserved.