Guest User

Untitled

a guest
Nov 17th, 2023
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. #!/usr/bin/env php
  2. <?php
  3. /**
  4. *
  5. * @ This file is created by http://DeZender.Net
  6. * @ deZender (PHP7 Decoder for SourceGuardian Encoder)
  7. *
  8. * @ Version : 5.0.1.0
  9. * @ Author : DeZender
  10. * @ Release on : 22.04.2022
  11. * @ Official site : http://DeZender.Net
  12. *
  13. */
  14.  
  15. $class = exec('mb-read class /etc/mailborder/package.info');
  16. if (($class == 1) || empty($class)) {
  17. $mb_set = ['class' => 1, 'platform' => 'master', 'mysql_db' => false, 'sphinx_db' => false, 'criterion_db' => false];
  18. }
  19. if (($class == 2) || ($class == 0)) {
  20. $mb_set = ['class' => 2, 'platform' => 'child', 'mysql_db' => false, 'sphinx_db' => false, 'criterion_db' => false];
  21. }
  22.  
  23. require_once '/usr/lib/mailborder/cli.load.php';
  24. $mbs_class = $mb_set['class'];
  25. $cli_options = getopt('a:dfhimnoptrsvz');
  26. $cli_options = array_map('trim', $cli_options);
  27. if (empty($cli_options) || isset($cli_options['h'])) {
  28. system('clear');
  29. echo 'This program is used to validate and provision licenses on Mailborder servers.' . PHP_EOL;
  30. echo 'Provisioning requires Internet connectivity. If this server does not have access ' . PHP_EOL;
  31. echo 'to the Internet, contact support for assistance with manual activation. ' . PHP_EOL;
  32. echo 'To purchase a new license, visit the Mailborder store. To upgrade license capabilities,' . PHP_EOL;
  33. echo 'visit the account section of the Mailborder website. ' . PHP_EOL;
  34. echo ' ' . PHP_EOL;
  35. echo '-a activate a new license' . PHP_EOL;
  36. echo '-d deactivate the current license' . PHP_EOL;
  37. echo '-f force deactivation if the online deactivation fails' . PHP_EOL;
  38. echo '-h display this help menu' . PHP_EOL;
  39. echo '-i display the system identifier code' . PHP_EOL;
  40. echo '-r reissue / renew the current license' . PHP_EOL;
  41. echo ' if you renewed your license on the Mailborder website, use this option to' . PHP_EOL;
  42. echo ' activate the new license' . PHP_EOL;
  43. echo '-s display the local system salt' . PHP_EOL;
  44. echo '-v show the version of this program' . PHP_EOL;
  45. echo '-z display the current license data' . PHP_EOL;
  46. echo '' . PHP_EOL;
  47. echo 'Example uses: mb-license -a 56c2159fddb4db1e7fa7c9c14ccff54c' . PHP_EOL;
  48. echo ' or: mb-license -d' . PHP_EOL;
  49. echo ' or: mb-license -r' . PHP_EOL;
  50. echo '' . PHP_EOL;
  51. exit(0);
  52. }
  53.  
  54. if (isset($cli_options['v'])) {
  55. echo 'version ' . $mb_g_data['version']['semver'] . PHP_EOL;
  56. exit(0);
  57. }
  58.  
  59. if (isset($cli_options['i'])) {
  60. echo '' . PHP_EOL;
  61. echo 'System Identifier Code: ' . $mb_g_data['keys']['sysid'] . PHP_EOL;
  62. echo '' . PHP_EOL;
  63. exit(0);
  64. }
  65.  
  66. if (isset($cli_options['s'])) {
  67. $salt = xfn_get_salt();
  68. echo '' . PHP_EOL;
  69. echo 'System Salt: ' . $salt . PHP_EOL;
  70. echo '' . PHP_EOL;
  71. exit(0);
  72. }
  73.  
  74. if (isset($cli_options['n'])) {
  75. $code = xfn_get_system_id();
  76. echo $code;
  77. exit();
  78. }
  79.  
  80. if (isset($cli_options['o'])) {
  81. $salt = xfn_get_salt();
  82. echo $salt;
  83. exit();
  84. }
  85.  
  86. if (isset($cli_options['a'])) {
  87. if (exec('whoami') != 'root') {
  88. echo 'Activation must be run as the root user. Either switch' . PHP_EOL;
  89. echo 'to the root user or run this command using the sudo' . PHP_EOL;
  90. ............................................................
  91. ....................................
  92. ..............
Advertisement
Add Comment
Please, Sign In to add comment