Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env php
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
- *
- * @ Version : 5.0.1.0
- * @ Author : DeZender
- * @ Release on : 22.04.2022
- * @ Official site : http://DeZender.Net
- *
- */
- $class = exec('mb-read class /etc/mailborder/package.info');
- if (($class == 1) || empty($class)) {
- $mb_set = ['class' => 1, 'platform' => 'master', 'mysql_db' => false, 'sphinx_db' => false, 'criterion_db' => false];
- }
- if (($class == 2) || ($class == 0)) {
- $mb_set = ['class' => 2, 'platform' => 'child', 'mysql_db' => false, 'sphinx_db' => false, 'criterion_db' => false];
- }
- require_once '/usr/lib/mailborder/cli.load.php';
- $mbs_class = $mb_set['class'];
- $cli_options = getopt('a:dfhimnoptrsvz');
- $cli_options = array_map('trim', $cli_options);
- if (empty($cli_options) || isset($cli_options['h'])) {
- system('clear');
- echo 'This program is used to validate and provision licenses on Mailborder servers.' . PHP_EOL;
- echo 'Provisioning requires Internet connectivity. If this server does not have access ' . PHP_EOL;
- echo 'to the Internet, contact support for assistance with manual activation. ' . PHP_EOL;
- echo 'To purchase a new license, visit the Mailborder store. To upgrade license capabilities,' . PHP_EOL;
- echo 'visit the account section of the Mailborder website. ' . PHP_EOL;
- echo ' ' . PHP_EOL;
- echo '-a activate a new license' . PHP_EOL;
- echo '-d deactivate the current license' . PHP_EOL;
- echo '-f force deactivation if the online deactivation fails' . PHP_EOL;
- echo '-h display this help menu' . PHP_EOL;
- echo '-i display the system identifier code' . PHP_EOL;
- echo '-r reissue / renew the current license' . PHP_EOL;
- echo ' if you renewed your license on the Mailborder website, use this option to' . PHP_EOL;
- echo ' activate the new license' . PHP_EOL;
- echo '-s display the local system salt' . PHP_EOL;
- echo '-v show the version of this program' . PHP_EOL;
- echo '-z display the current license data' . PHP_EOL;
- echo '' . PHP_EOL;
- echo 'Example uses: mb-license -a 56c2159fddb4db1e7fa7c9c14ccff54c' . PHP_EOL;
- echo ' or: mb-license -d' . PHP_EOL;
- echo ' or: mb-license -r' . PHP_EOL;
- echo '' . PHP_EOL;
- exit(0);
- }
- if (isset($cli_options['v'])) {
- echo 'version ' . $mb_g_data['version']['semver'] . PHP_EOL;
- exit(0);
- }
- if (isset($cli_options['i'])) {
- echo '' . PHP_EOL;
- echo 'System Identifier Code: ' . $mb_g_data['keys']['sysid'] . PHP_EOL;
- echo '' . PHP_EOL;
- exit(0);
- }
- if (isset($cli_options['s'])) {
- $salt = xfn_get_salt();
- echo '' . PHP_EOL;
- echo 'System Salt: ' . $salt . PHP_EOL;
- echo '' . PHP_EOL;
- exit(0);
- }
- if (isset($cli_options['n'])) {
- $code = xfn_get_system_id();
- echo $code;
- exit();
- }
- if (isset($cli_options['o'])) {
- $salt = xfn_get_salt();
- echo $salt;
- exit();
- }
- if (isset($cli_options['a'])) {
- if (exec('whoami') != 'root') {
- echo 'Activation must be run as the root user. Either switch' . PHP_EOL;
- echo 'to the root user or run this command using the sudo' . PHP_EOL;
- ............................................................
- ....................................
- ..............
Advertisement
Add Comment
Please, Sign In to add comment