Example #1
0
function start_app()
{
    ${"GLOBALS"}["jpbtsovxvpc"] = "q";
    ${"GLOBALS"}["dvhmjr"] = "r";
    global $mysqli;
    ${${"GLOBALS"}["jpbtsovxvpc"]} = "SELECT * FROM login WHERE id = " . $_SESSION["userID"];
    ${"GLOBALS"}["unxwytcgxeb"] = "r";
    ${"GLOBALS"}["cikbqrwj"] = "q";
    ${"GLOBALS"}["jbvavtd"] = "r";
    $vxyxdcqyi = "q2";
    ${${"GLOBALS"}["dvhmjr"]} = mysqli_query(${${"GLOBALS"}["mikmhj"]}, ${${"GLOBALS"}["cikbqrwj"]});
    if (${${"GLOBALS"}["unxwytcgxeb"]} && mysqli_num_rows(${${"GLOBALS"}["jbvavtd"]}) > 0) {
        ${"GLOBALS"}["wsltvbfk"] = "row";
        ${"GLOBALS"}["fmxhsmo"] = "r";
        while (${${"GLOBALS"}["wsltvbfk"]} = mysqli_fetch_array(${${"GLOBALS"}["fmxhsmo"]})) {
            ${"GLOBALS"}["yhozwenc"] = "row";
            ${"GLOBALS"}["rbkckwdexp"] = "row";
            ${"GLOBALS"}["zbetsnb"] = "row";
            $itrjspjvr = "row";
            $_SESSION["name"] = stripslashes(${$itrjspjvr}["name"]);
            $_SESSION["company"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["company"]);
            $_SESSION["email"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["username"]);
            ${"GLOBALS"}["pfgusliwy"] = "row";
            $_SESSION["password"] = stripslashes(${${"GLOBALS"}["zbetsnb"]}["password"]);
            ${"GLOBALS"}["pblnhv"] = "row";
            $_SESSION["s3_key"] = stripslashes(${${"GLOBALS"}["pfgusliwy"]}["s3_key"]);
            $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["s3_secret"]);
            $_SESSION["license"] = stripslashes(trim(${${"GLOBALS"}["xmhovsplmpbk"]}["license"]));
            $_SESSION["tied_to"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["tied_to"]);
            $_SESSION["restricted_to_app"] = stripslashes(${${"GLOBALS"}["yhozwenc"]}["app"]);
            $_SESSION["timezone"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["timezone"]);
            $_SESSION["language"] = stripslashes(${${"GLOBALS"}["pblnhv"]}["language"]);
            $_SESSION["cron"] = stripslashes(${${"GLOBALS"}["rbkckwdexp"]}["cron"]);
            $_SESSION["send_rate"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["send_rate"]);
            ${"GLOBALS"}["bsttynvop"] = "row";
            $_SESSION["ses_endpoint"] = stripslashes(${${"GLOBALS"}["bsttynvop"]}["ses_endpoint"]);
            if ($_SESSION["timezone"] == "") {
                $_SESSION["timezone"] = date_default_timezone_get();
            }
            date_default_timezone_set($_SESSION["timezone"]);
            if ($_SESSION["language"] != "en_US") {
                set_locale($_SESSION["language"]);
            }
            if ($_SESSION["tied_to"] != "") {
                ${${"GLOBALS"}["fsywgryp"]} = "SELECT s3_key, s3_secret, license, ses_endpoint FROM login WHERE id = " . $_SESSION["tied_to"];
                ${${"GLOBALS"}["sfdgfhfkq"]} = mysqli_query(${${"GLOBALS"}["mikmhj"]}, ${${"GLOBALS"}["fsywgryp"]});
                if (${${"GLOBALS"}["sfdgfhfkq"]} && mysqli_num_rows(${${"GLOBALS"}["sfdgfhfkq"]}) > 0) {
                    while (${${"GLOBALS"}["xmhovsplmpbk"]} = mysqli_fetch_array(${${"GLOBALS"}["sfdgfhfkq"]})) {
                        $hkgkiow = "row";
                        $mmwuddtsm = "row";
                        $_SESSION["s3_key"] = stripslashes(${$mmwuddtsm}["s3_key"]);
                        ${"GLOBALS"}["mgkewgwspdm"] = "row";
                        $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["xmhovsplmpbk"]}["s3_secret"]);
                        $_SESSION["license"] = stripslashes(${$hkgkiow}["license"]);
                        $_SESSION["ses_endpoint"] = stripslashes(${${"GLOBALS"}["mgkewgwspdm"]}["ses_endpoint"]);
                    }
                }
                $_SESSION["is_sub_user"] = true;
            } else {
                $_SESSION["is_sub_user"] = false;
                $_SESSION["tied_to"] = $_SESSION["userID"];
            }
        }
    }
    $suahtbied = "q2";
    $rgynyxehkg = "r2";
    ${$vxyxdcqyi} = "SELECT api_key FROM login ORDER BY id ASC LIMIT 1";
    ${${"GLOBALS"}["qssdejigbr"]} = mysqli_query(${${"GLOBALS"}["mikmhj"]}, ${$suahtbied});
    if (${${"GLOBALS"}["qssdejigbr"]} && mysqli_num_rows(${$rgynyxehkg}) > 0) {
        $fphyvbzxlh = "row";
        $dljrqmmo = "row";
        while (${$fphyvbzxlh} = mysqli_fetch_array(${${"GLOBALS"}["qssdejigbr"]})) {
            $_SESSION["api_key"] = ${$dljrqmmo}["api_key"];
        }
    }
    if (!isset($_COOKIE["version"])) {
        $fjkodjnd = "version_latest";
        ${$fjkodjnd} = file_get_contents_curl("http://gateway.sendy.co/version-checker");
        if (setcookie("version", ${${"GLOBALS"}["gitgoead"]}, time() + 86400, "/", COOKIE_DOMAIN)) {
            ${"GLOBALS"}["pbepczt"] = "version_latest";
            $_SESSION["version_latest"] = ${${"GLOBALS"}["pbepczt"]};
        }
    } else {
        $_SESSION["version_latest"] = $_COOKIE["version"];
    }
    if (!defined("CURRENT_VERSION")) {
        define("CURRENT_VERSION", "2.0.7");
    }
    if (isset($_SESSION[$_SESSION["license"]])) {
        if ($_SESSION[$_SESSION["license"]] != hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy")) {
            echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"img/favicon.png\"><title>Invalid license or domain</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 300px;height: 110px;margin: -140px 0 0 -150px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #000;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Invalid license or domain</h2></p><p>Are you running Sendy on the domain you purchased it for?</p></div></body></html>";
            unlog_session();
            exit;
        }
    } else {
        ${"GLOBALS"}["fohejunds"] = "license";
        ${"GLOBALS"}["ldkfhdzyqh"] = "license";
        ${${"GLOBALS"}["fohejunds"]} = file_get_contents_curl("http://gateway.sendy.co/gateway/" . $_SERVER["HTTP_HOST"] . "/" . $_SESSION["license"] . "/" . ipaddress() . "/" . str_replace("/", "|s|", APP_PATH) . "/" . CURRENT_VERSION . "/" . time() . "/");
        $bdxxpntfdjf = "license";
        if (${${"GLOBALS"}["ldkfhdzyqh"]} == "blocked") {
            echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"/img/favicon.png\"><title>Outgoing connections is blocked</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 330px;height: 130px;margin: -140px 0 0 -165px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #000;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Outgoing connections blocked</h2></p><p>Your server has a firewall blocking outgoing connections. Please contact your host to whitelist 'sendy.co' & 'amazonaws.com'.</p></div></body></html>";
            exit;
        } else {
            if (${${"GLOBALS"}["kmedcvmgnt"]} == "version error") {
                echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"/img/favicon.png\"><title>Upgrade your license to 2.0</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 330px;height: 130px;margin: -140px 0 0 -165px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #4572A6;text-decoration: underline;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Upgrade your license to 2.x</h2></p><p>Your Sendy license requires an upgrade to version 2.x. Please visit <a href=\"https://sendy.co/get-updated\" target=\"_blank\">https://sendy.co/get-updated</a> to purchase an upgrade in order to proceed.</p></div></body></html>";
                exit;
            } else {
                if (${$bdxxpntfdjf}) {
                    $_SESSION[$_SESSION["license"]] = hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy");
                } else {
                    $_SESSION[$_SESSION["license"]] = "";
                }
            }
        }
    }
    session_write_close();
}
Example #2
0
<?php

include_once 'includes/functions.php';
if (unlog_session()) {
    header('Location: ' . get_app_info('path') . '/login');
}
Example #3
0
function start_app()
{
    global $mysqli;
    $wxqywuso = "r";
    $iddclumdtx = "q";
    ${${"GLOBALS"}["kypbtpqaite"]} = "SELECT * FROM login WHERE id = " . $_SESSION["userID"];
    ${$wxqywuso} = mysqli_query(${${"GLOBALS"}["zymgfktjwdk"]}, ${$iddclumdtx});
    if (${${"GLOBALS"}["lmhdiylgjh"]} && mysqli_num_rows(${${"GLOBALS"}["lmhdiylgjh"]}) > 0) {
        ${"GLOBALS"}["rwrgerkngpw"] = "r";
        ${"GLOBALS"}["loukcmxe"] = "row";
        while (${${"GLOBALS"}["loukcmxe"]} = mysqli_fetch_array(${${"GLOBALS"}["rwrgerkngpw"]})) {
            ${"GLOBALS"}["ovrlts"] = "row";
            $nkxcmgzbh = "row";
            $_SESSION["name"] = stripslashes(${${"GLOBALS"}["ovrlts"]}["name"]);
            $_SESSION["company"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["company"]);
            $_SESSION["email"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["username"]);
            $_SESSION["password"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["password"]);
            $_SESSION["s3_key"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["s3_key"]);
            $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["s3_secret"]);
            $_SESSION["api_key"] = stripslashes(${$nkxcmgzbh}["api_key"]);
            $_SESSION["license"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["license"]);
            $_SESSION["tied_to"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["tied_to"]);
            $_SESSION["restricted_to_app"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["app"]);
            ${"GLOBALS"}["mnciebhmo"] = "row";
            $_SESSION["timezone"] = stripslashes(${${"GLOBALS"}["mnciebhmo"]}["timezone"]);
            $_SESSION["language"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["language"]);
            $_SESSION["cron"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["cron"]);
            date_default_timezone_set($_SESSION["timezone"]);
            if ($_SESSION["language"] != "en_US") {
                set_locale($_SESSION["language"]);
            }
            if ($_SESSION["tied_to"] != "") {
                $gjnvssmsr = "q";
                ${"GLOBALS"}["zgihjqjiqcu"] = "mysqli";
                ${${"GLOBALS"}["kypbtpqaite"]} = "SELECT s3_key, s3_secret, license FROM login WHERE id = " . $_SESSION["tied_to"];
                ${"GLOBALS"}["zgcrosuud"] = "r";
                ${"GLOBALS"}["pkwapxhu"] = "r";
                ${${"GLOBALS"}["lmhdiylgjh"]} = mysqli_query(${${"GLOBALS"}["zgihjqjiqcu"]}, ${$gjnvssmsr});
                if (${${"GLOBALS"}["zgcrosuud"]} && mysqli_num_rows(${${"GLOBALS"}["pkwapxhu"]}) > 0) {
                    while (${${"GLOBALS"}["tkigemshnse"]} = mysqli_fetch_array(${${"GLOBALS"}["lmhdiylgjh"]})) {
                        $xdedkslgffqz = "row";
                        ${"GLOBALS"}["ekvrklvhgq"] = "row";
                        $_SESSION["s3_key"] = stripslashes(${${"GLOBALS"}["tkigemshnse"]}["s3_key"]);
                        $_SESSION["s3_secret"] = stripslashes(${${"GLOBALS"}["ekvrklvhgq"]}["s3_secret"]);
                        $_SESSION["license"] = stripslashes(${$xdedkslgffqz}["license"]);
                    }
                }
                $_SESSION["is_sub_user"] = true;
            } else {
                $_SESSION["is_sub_user"] = false;
                $_SESSION["tied_to"] = $_SESSION["userID"];
            }
        }
    }
    if (!isset($_COOKIE["version"])) {
        ${"GLOBALS"}["iepwdwkbk"] = "version_latest";
        ${${"GLOBALS"}["sdlczcc"]} = file_get_contents_curl("http://sendy.co/version-checker");
        if (setcookie("version", ${${"GLOBALS"}["iepwdwkbk"]}, time() + 86400, "/", COOKIE_DOMAIN)) {
            $_SESSION["version_latest"] = ${${"GLOBALS"}["sdlczcc"]};
        }
    } else {
        $_SESSION["version_latest"] = $_COOKIE["version"];
    }
    if (!defined("CURRENT_VERSION")) {
        define("CURRENT_VERSION", "1.1.6.3");
    }
    if (isset($_SESSION[$_SESSION["license"]])) {
        if ($_SESSION[$_SESSION["license"]] != hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy")) {
            echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/><link rel=\"Shortcut Icon\" type=\"image/ico\" href=\"img/favicon.png\"><title>Invalid license or domain</title></head><style type=\"text/css\">body{background: #ffffff;font-family: Helvetica, Arial;}#wrapper{background: #f2f2f2;width: 300px;height: 110px;margin: -140px 0 0 -150px;position: absolute;top: 50%;left: 50%;-webkit-border-radius: 5px;-moz-border-radius: 5px;border-radius: 5px;}p{text-align: center;line-height: 18px;font-size: 12px;padding: 0 30px;}h2{font-weight: normal;text-align: center;font-size: 20px;}a{color: #000;}a:hover{text-decoration: none;}</style><body><div id=\"wrapper\"><p><h2>Invalid license or domain</h2></p><p>Are you running Sendy on the domain you purchased it for?</p></div></body></html>";
            unlog_session();
            exit;
        }
    } else {
        ${${"GLOBALS"}["pvlwcqd"]} = file_get_contents_curl("http://sendy.co/gateway/" . $_SERVER["HTTP_HOST"] . "/" . $_SESSION["license"] . "/" . ipaddress() . "/" . str_replace("/", "|s|", APP_PATH) . "/" . CURRENT_VERSION . "/" . time() . "/");
        $luwydjpttli = "license";
        if (${$luwydjpttli}) {
            $_SESSION[$_SESSION["license"]] = hash("sha512", $_SESSION["license"] . "2ifQ9IppVwYdOgSJoQhKOHAUK/oPwKZy");
        } else {
            $_SESSION[$_SESSION["license"]] = "";
        }
    }
    session_write_close();
}