Advertisement
Guest User

Untitled

a guest
Apr 6th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. /**
  2. *
  3. * @ This file is created by http://DeZender.Net
  4. * @ deZender (PHP7 Decoder for ionCube Encoder)
  5. *
  6. * @ Version : 4.0.8.5
  7. * @ Author : DeZender
  8. * @ Release on : 25.03.2019
  9. * @ Official site : http://DeZender.Net
  10. *
  11. */
  12.  
  13. class HetznerCloudLicense
  14. {
  15. public function __construct($UWSKey = NULL)
  16. {
  17. $LRemKey = \Illuminate\Database\Capsule\Manager::table('tbladdonmodules')->select('value')->where(['setting' => 'whmcsmodule_key', 'module' => 'HetznerCloud'])->get();
  18. $this->LicenseKey = $LRemKey[0]->value;
  19. }
  20.  
  21. public function __destruct()
  22. {
  23. }
  24.  
  25. public function HetznerCloud_LicenseCheck()
  26. {
  27. $status = self::Get_HetznerCloudLicenseCheck();
  28. return $status['results']['status'];
  29. }
  30.  
  31. public function get_HetznerCloudLicenseInfo_config()
  32. {
  33. $HetznerCloudLicenseInfo_config = [];
  34. $llkey = \Illuminate\Database\Capsule\Manager::table('mod_hcloud_license')->select('localvalue')->where(['localkey' => 'whmcsmod_hetzner', 'id' => '1'])->get();
  35. $HetznerCloudLicenseInfo_config['RemoteKey'] = $this->LicenseKey;
  36. $HetznerCloudLicenseInfo_config['LocalKey'] = $llkey[0]->localvalue;
  37. return $HetznerCloudLicenseInfo_config;
  38. }
  39.  
  40. public function get_HetznerCloud_prekey()
  41. {
  42. return ['HetznerCloud-Owned', 'HetznerCloud-Yearly'];
  43. }
  44.  
  45. public function Get_HetznerCloudLicenseCheck()
  46. {
  47. $LicenseConfig = self::get_HetznerCloudLicenseInfo_config();
  48. $zlk = explode('-', $LicenseConfig['RemoteKey'], -1);
  49. $zlk = implode('-', $zlk);
  50. $HetznerCloudprekey = self::get_HetznerCloud_prekey();
  51. $RemoteKey = $LicenseConfig['RemoteKey'];
  52. $LocalKey = $LicenseConfig['LocalKey'];
  53. $name = 'HetznerCloud';
  54.  
  55. if (!preg_match('/^' . $name . '\\-(Yearly|Owned)\\-[a-zA-Z0-9]{10}$/', $RemoteKey)) {
  56. $License['results']['status'] = 'Invalid';
  57. $License['results']['message'] = 'Invalid License Key';
  58. }
  59. else if (in_array($zlk, $HetznerCloudprekey)) {
  60. $results = self::HetznerCloud_Lcheck($RemoteKey, $LocalKey);
  61.  
  62. switch ($results['status']) {
  63. ...................................................................
  64. .......................................
  65. ..............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement