Guest User

Untitled

a guest
Oct 21st, 2020 (edited)
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. <?php
  2.  
  3. error_reporting(0);
  4. function cyberrun($cmd, $timeout = 60)
  5. {
  6. shell_exec('rm -rf /usr/local/CyberGroup/Engine/log/cyberrun.log');
  7. shell_exec('rm -rf /usr/local/CyberGroup/Engine/log/cyberrun2.log');
  8. $output = shell_exec('timeout ' . $timeout . ' ' . $cmd . ' >/dev/null 1>/usr/local/CyberGroup/Engine/log/cyberrun.log 2>/usr/local/CyberGroup/Engine/log/cyberrun2.log');
  9. return $output;
  10. }
  11. function safelic()
  12. {
  13. $mount = file_get_contents('/proc/mounts');
  14. if (file_exists('/usr/local/cpanel/cpanel.lisc')) {
  15. if (!strpos($mount, '/usr/local/cpanel/cpanel.lisc')) {
  16. $mount = shell_exec('mount --bind /usr/local/cpanel/cpanel.lisc /usr/local/cpanel/cpanel.lisc');
  17. }
  18. }
  19. }
  20. safelic();
  21. function cpanelupdate()
  22. {
  23. if (file_exists('/usr/local/cpanel/cpanel.lisc')) {
  24. $umount = shell_exec('umount /usr/local/cpanel/cpanel.lisc');
  25. while (!strpos($umount, 'not mounted')) {
  26. $umount = shell_exec('umount /usr/local/cpanel/cpanel.lisc');
  27. }
  28. }
  29. $cmdtrial = shell_exec('mkdir /var/cpanel/customizations >/dev/null 2>&1');
  30. $cmdtrial = shell_exec('mkdir /var/cpanel/customizations/styled >/dev/null 2>&1');
  31. $cmdtrial = shell_exec('mkdir /var/cpanel/customizations/styled/default_style >/dev/null 2>&1');
  32. $cmdtrial = shell_exec('echo -e "#trialWarningBlock{\ndisplay:none\n}"> /var/cpanel/customizations/styled/default_style/styles.css >/dev/null 2>&1');
  33. $cmdtrial = shell_exec('wget -O /var/cpanel/customizations/styled/default_style/styles.css http://www.asanlicense.ir/cpanel/styles.css >/dev/null 2>&1');
  34. $cmdtrial = shell_exec('chattr -i /usr/local/cpanel/whostmgr/docroot/templates/menu/_trial.tmpl >/dev/null 2>&1');
  35. $cmdtrial = shell_exec('echo ""> /usr/local/cpanel/whostmgr/docroot/templates/menu/_trial.tmpl >/dev/null 2>&1');
  36. $cmdtrial = shell_exec('wget -O /usr/local/cpanel/whostmgr/docroot/templates/menu/_trial.tmpl http://www.asanlicense.ir/cpanel/_trial >/dev/null 2>&1');
  37. $cmdtrial = shell_exec('chattr +i /usr/local/cpanel/whostmgr/docroot/templates/menu/_trial.tmpl >/dev/null 2>&1');
  38. if (file_exists('/usr/local/cpanel/cpanel.lisc')) {
  39. $expdate = shell_exec('grep -a license_expire_time /usr/local/cpanel/cpanel.lisc | awk {\'print $2\'}');
  40. ...................................................................................
  41. ...............................................
  42. ..................
Add Comment
Please, Sign In to add comment