Guest User

Untitled

a guest
Sep 2nd, 2024
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP8 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 8.2.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 27.10.2023
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function get_all_domains()
  15. {
  16. $cmd = '/usr/sbin/whmapi1 get_domain_info --output=json';
  17. $output = shell_exec($cmd);
  18. $whmdata = json_decode($output, true);
  19. $domains = $whmdata['data']['domains'];
  20. $data = [];
  21.  
  22. foreach ($domains as $domdata) {
  23. if (!stringStartsWith($domdata['domain'], '*')) {
  24. $data[$domdata['domain']]['domain'] = $domdata['domain'];
  25. $data[$domdata['domain']]['user'] = $domdata['user'];
  26. $data[$domdata['domain']]['docroot'] = $domdata['docroot'];
  27. $data[$domdata['domain']]['domain_type'] = $domdata['domain_type'];
  28. }
  29. }
  30.  
  31. return $data;
  32. }
  33.  
  34. function list_users()
  35. {
  36. $cmd = '/usr/sbin/whmapi1 list_users --output=json';
  37. $output = shell_exec($cmd);
  38. $whmdata = json_decode($output, true);
  39. $users = $whmdata['data']['users'];
  40. asort($users);
  41. $data = [];
  42.  
  43. foreach ($users as $user) {
  44. if ($user != 'root') {
  45. $data[] = $user;
  46. }
  47. }
  48.  
  49. return $data;
  50. }
  51.  
  52. function settings()
  53. {
  54. $settings = [];
  55.  
  56. if (file_exists('/etc/cpremote/data/settings.json')) {
  57. $data = file_get_contents('/etc/cpremote/data/settings.json');
  58. $settings = json_decode($data, true);
  59. }
  60. else {
  61. $settings = [];
  62. }
  63.  
  64. return $settings;
  65. }
  66.  
  67. function get_all_schedule()
  68. {
  69. $data = [];
  70.  
  71. if (is_dir('/etc/cpremote/schedule/')) {
  72. $schedules = array_diff(scandir('/etc/cpremote/schedule/'), ['.', '..']);
  73. }
  74. else {
  75. $schedules = [];
  76. }
  77.  
  78. foreach ($schedules as $s) {
  79. if (stringEndsWith($s, '.json')) {
  80. $job = explode('.', $s);
  81. $data[$job[0]] = '/etc/cpremote/schedule/' . $s;
  82. }
  83. }
  84.  
  85. return $data;
  86. }
  87.  
  88. function search_backups($id)
  89. {
  90. $cmd = '/usr/local/cpremote/bin/cpremotectl backup search ' . $id . ' output=json';
  91. $output = shell_exec($cmd);
  92. ...............................................................................
  93. ..........................................
  94. ................
Advertisement
Add Comment
Please, Sign In to add comment