hp
/**
* License validation bypass — all checks pass, all limits are unlimited.
* Original obfuscated file preserved as process-ORIGINAL.php.
*/
// ============================================================
// License class — always valid, unlimited
// ============================================================
class License
{
/** @var bool false = no error */
private bool $error = false;
/**
* "Load" the license from a key. Always succeeds.
*/
public function m0dk2Ok80x7fx09Ot(string $key = 'i', $email = false): self
{
$this->error = false;
return $this;
}
public function GetError(): bool
{
return false;
}
/** 0 = unlimited users */
public function GetUsers(): int
{
return 0;
}
public function GetAgencyID(): int
{
return 0;
}
public function GetTrialAccountLimit(): int
{
return 0;
}
public function GetTrialAccountEmail(): int
{
return 0;
}
public function GetTrialAccountDays(): int
{
return 0;
}
public function GetNFR(): bool
{
return false;
}
public function GetDomain(): string
{
return md5($_SERVER['SERVER_NAME'] ?? 'localhost');
}
public function GetExpires(): string
{
return '31/12/2099';
}
public function GetVersion(): string
{
return '8.6.0';
}
public function GetEdition(): string
{
return 'Enterprise';
}
public function GetLicEmailAddress(): string
{
$email = defined('SENDSTUDIO_LIC_EMAILADDRESS') ? SENDSTUDIO_LIC_EMAILADDRESS : 'license@localhost';
return $this->hashEmailAddress($email);
}
public function hashEmailAddress(string $email): string
{
$h = hash('sha256', $email, true);
return hash('sha256', $h, true);
}
public function bin2hexEmailAddress(string $hash): string
{
return bin2hex($hash);
}
public function GetPingbackDays(): int
{
return -1;
}
public function GetPingbackGrace(): int
{
return 0;
}
/** Alias kept for compatibility */
public function Expires(): string
{
return $this->GetExpires();
}
}
// ============================================================
// Core license functions
// ============================================================
/**
* Return a cached valid License object.
*/
function ss02k31nnb(string $key = 'i', $email = false): License
{
static $lic = null;
if ($lic === null) {
$lic = new License();
$lic->m0dk2Ok80x7fx09Ot($key, $email);
}
return $lic;
}
/**
* Open/get the current license. Defines IEM_SYSTEM_LICENSE_AGENCY as a side-effect.
*
* @return License
*/
function f0pen(): License
{
static $lic = null;
if ($lic === null) {
$key = defined('SENDSTUDIO_LICENSEKEY') ? constant('SENDSTUDIO_LICENSEKEY') : '';
$lic = ss02k31nnb($key);
if (!defined('IEM_SYSTEM_LICENSE_AGENCY')) {
define('IEM_SYSTEM_LICENSE_AGENCY', 0);
}
}
return $lic;
}
/**
* Check whether a feature constant restricts access.
* Returns true when the feature IS allowed (restriction constant not defined).
*/
function OK(string $const): bool
{
ss02k31nnb();
return !defined($const);
}
/**
* Check DB-type compatibility. Always returns true.
*/
function installCheck(): bool
{
$args = func_get_args();
if (count($args) !== 2) {
return false;
}
return true;
}
/**
* Per-session license check.
* Returns [false, ''] on success (no error), [true, 'message'] on failure.
*/
function sesion_start($key = false): array
{
return [false, ''];
}
// ============================================================
// User / agency helpers
// ============================================================
/**
* Query actual user counts from the database.
*
* @return array{trial:int,normal:int}|false
*/
function get_current_user_count()
{
$db = IEM::getDatabase();
$result = $db->Query('SELECT COUNT(1) AS count, trialuser FROM [|PREFIX|]users GROUP BY trialuser');
if (!$result) {
return false;
}
$counts = ['trial' => 0, 'normal' => 0];
while ($row = $db->Fetch($result)) {
if ($row['trialuser'] == '1') {
$counts['trial'] += (int) $row['count'];
} else {
$counts['normal'] += (int) $row['count'];
}
}
$db->FreeResult($result);
return $counts;
}
/**
* Return available user slots. Always unlimited.
*
* @return array{normal:true,trial:true}
*/
function get_available_user_count(): array
{
return ['normal' => true, 'trial' => true];
}
/**
* Return agency license variables. No agency edition active.
*
* @return array
*/
function get_agency_license_variables(): array
{
return [
'agencyid' => 0,
'trial_account' => 0,
'trial_email_limit' => 0,
'trial_days' => 0,
];
}
/**
* Warm the license cache for the caller.
* The original function accepts a by-reference arg but never assigns to it;
* it is used purely as a cache-warming call.
*/
function gmt(&$var = null): void
{
ss02k31nnb(defined('SENDSTUDIO_LICENSEKEY') ? constant('SENDSTUDIO_LICENSEKEY') : '');
}
/**
* Agency current-user report.
* Returns false when not an agency edition (agencyid = 0).
*/
function ssk23twgezm2()
{
ss9O24kwehbehb();
return false; // not an agency edition
}
/**
* Check whether a user can be created/modified given license limits.
* Always returns true (unlimited).
*/
function ss9024kwehbehb(User_API &$user): bool
{
ss9O24kwehbehb();
if (!constant('IEM_SYSTEM_ACTIVE')) {
return false;
}
return true;
}
/**
* Redirect guard — called to redirect when license is inactive.
* License is always active, so this is a no-op.
*/
function ss9O24kwehbehb(): void
{
// License always active — no redirect needed.
}
/**
* Optionally append a SQL LIMIT clause based on the licensed user count.
* With GetUsers() == 0 (unlimited) this is a no-op.
*/
function setmax($limit, string &$sql): void
{
ss9O24kwehbehb();
$lic = f0pen();
$userLimit = $lic->GetUsers(); // 0 = unlimited
if ($userLimit === 0) {
return;
}
$sql .= ' ORDER BY l.subscribeddate ASC LIMIT ' . $userLimit;
}
// ============================================================
// Directory helpers
// ============================================================
/**
* Delete the temp directory for a user.
*/
function del_user_dir(int $userid = 0): void
{
$userid = (int) $userid;
if ($userid <= 0) {
return;
}
$dir = TEMP_DIRECTORY . '/user/' . $userid;
if (is_dir($dir) && function_exists('RemoveDirectory')) {
RemoveDirectory($dir);
}
}
/**
* Ensure the user temp directory exists.
*/
function check_user_dir(int $userid, int $mode = 0): bool
{
return create_user_dir($userid, 1, $mode) === true;
}
/**
* Create (or verify) the per-user temp directory.
*
* @param int $userid User ID
* @param int $create 0 = check only, 1+ = create
* @param int $mode Directory mode flag (0–2)
* @return bool|null
*/
function create_user_dir(int $userid = 0, int $create = 0, int $mode = 0)
{
static $cache = false;
$userid = (int) $userid;
$create = (int) $create;
$mode = (int) $mode;
if (!in_array($create, [0, 1, 2, 3], true)) {
return false;
}
if (!in_array($mode, [0, 1, 2], true)) {
return false;
}
$dir = TEMP_DIRECTORY . '/user/' . $userid;
if ($create >= 1 && function_exists('CreateDirectory')) {
CreateDirectory($dir, TEMP_DIRECTORY, 0777);
}
return is_dir($dir) ? true : false;
}
// ============================================================
// Misc helpers
// ============================================================
/**
* Validate a process-job init parameter.
*/
function validateProcessJobInit($jobData): bool
{
if (!is_array($jobData)) {
return false;
}
return true;
}
/**
* Base64 decode / eval helper.
* When $exec is false, returns decoded string. When true, evals (no-op in bypass).
*
* @return string|true
*/
function iejriwe9479823476jdfhg(string $data, bool $exec = false)
{
if ($exec) {
return true; // eval path disabled
}
return base64_decode($data);
}
/**
* Old-format license key check stub.
* Always reports "valid" in the bypass.
*
* @return array{0:bool,1:string}
*/
function s435wrsQmzeryter44Rtt($key = false): array
{
return [false, ''];
}
/**
* Render the admin-index display box panel.
* Returns HTML to be stored in $GLOBALS['DisplayBox'].
*/
function GetDisplayInfo($obj): string
{
$lic = f0pen();
$GLOBALS['ProductEdition'] = $lic->GetEdition();
if (!is_object($obj) || !method_exists($obj, 'ParseTemplate')) {
return '';
}
$panel = $obj->ParseTemplate('index_popularhelpArticles_panel', true);
if (!$panel) {
return '';
}
return str_replace('id="popularhelpArticles"', 'id="upgradeNotice"', $panel);
}
/**
* Timing / environment sanity check.
*/
function check(): bool
{
return true;
}
/**
* Set Searchbox_List_Info global and return the (lowercased) template name.
* Signature: checkTemplate($name, $flag) — extra args handled via func_get_args().
*/
function checkTemplate(): string
{
$args = func_get_args();
if (count($args) !== 2) {
return '';
}
$name = strtolower((string) $args[0]);
if (function_exists('GetLang')) {
$GLOBALS['Searchbox_List_Info'] = GetLang(
'Searchbox_List_Info',
'(Only visible contact lists/segments you have ticked will be selected)'
);
}
return $name;
}
/**
* Shutdown / cleanup handler called at the end of index.php.
*/
function shutdown_and_cleanup(): void
{
ss9O24kwehbehb();
}
/**
* Page init hook called by InterspireTemplate::preParsePage().
* No-op in bypass mode.
*/
function preParsePageInit($page): void
{
// no-op
}
/**
* Request param validation hook called by IEM_Request::getParam().
* No-op in bypass mode.
*/
function validateParamInit($name): void
{
// no-op
}
/**
* Gate check called in User_API::HasAccess().
* Returns true so that normal permission logic continues.
*
* @param mixed $area
* @param mixed $subarea
* @param int $id
* @param int $userid
* @return bool
*/
function gz0pen($area = null, $subarea = null, int $id = 0, int $userid = 0): bool
{
return true;
}
/**
* Subscriber count size check against license limit.
* No-op in bypass mode (unlimited subscribers allowed).
*
* @param int $count Current subscriber count.
* @param int $setmax Max allowed (ignored).
* @param bool $countonly Whether this is a count-only query.
*/
function checksize(int $count, $setmax, bool &$countonly): void
{
// no-op — no subscriber limit enforced
}
// ============================================================
// Global initialisation — define system-active constants
// ============================================================
if (!defined('IEM_SYSTEM_ACTIVE')) {
define('IEM_SYSTEM_ACTIVE', true);
}
// Ensure IEM_SYSTEM_LICENSE_AGENCY is defined (f0pen() also does this,
// but define it here in case f0pen() hasn't been called yet).
if (!defined('IEM_SYSTEM_LICENSE_AGENCY')) {
define('IEM_SYSTEM_LICENSE_AGENCY', 0);
}
The application cannot proceed!
|
The application cannot proceed!
An internal error occurred. Please contact your administrator and describe the steps you took before you encounter this error message. Error msg: Call to undefined function ss9O24kwehbehb()
|
|