No it is not, that part is easy to bypass anyways.
<?php
class Encryption {
public static function encrypt($i, $key) {
$encrypted = openssl_encrypt($i, 'aes-128-ecb', base64_decode($key), 0);
$length = strlen($encrypted);
return array($encrypted, $length);
}
public static function run($i) {
$substring = rand(10, strlen($i) - 20);
$ep1 = self::encrypt(substr($i, 0, $substring), "UXNrR1VGUU15Nkt0aldkMQ==");
$ep2 = self::encrypt(substr($i, $substring), "MWRXanRLNnlNUUZVR2tzUQ==");
$encoded = base64_encode($ep1[0] . $ep2[0] . '!' . $ep1[1]);
return '{"data":"' . $encoded . '"}';
}
}
try {
$pdo = new PDO('sqlite:../../api/.cockpit-0001.db');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$accounts_query = $pdo->query('SELECT * FROM stremio_debrid WHERE debrid_service = \'premiumize\' ORDER BY RANDOM() LIMIT 1');
$stremio_premiumize = $accounts_query->fetch(PDO::FETCH_ASSOC);
$services_query = $pdo->query('SELECT * FROM xc_domains_stremio');
$stremio_services = $services_query->fetchAll(PDO::FETCH_ASSOC);
$serviceList = array();
foreach ($stremio_services as $service) {
$url = ($service['ssl'] == 'true' ? 'https://' : 'http://') . $service['dns'] . ':' . $service['port'];
array_push($serviceList, array(
'name' => $service['name'],
'url' => $url
));
}
$protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https://' : 'http://';
$host = $_SERVER['HTTP_HOST'];
$directory = dirname($_SERVER['PHP_SELF']);
array_push($serviceList, array(
'name' => 'Cockpit Panel',
'url' => $protocol . $host . $directory . '/player_api.php'
));
$jsonData = array(
'portals' => $serviceList,
'key' => $stremio_premiumize['key'] ?? ''
);
$inputData = json_encode($jsonData);
header('Content-Type: application/json');
echo Encryption::run($inputData);
$pdo = null;
} catch (PDOException $e) {
echo json_encode(array('error' => 'Database error: ' . $e->getMessage()));
}
?>
Something like this would do that likely.