Advertisement
Guest User

Untitled

a guest
May 5th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 3.0.8.0
  8. * @ Author : DeZender
  9. * @ Release on : 25.09.2017
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. require_once '/opt/unetlab/html/includes/init.php';
  15.  
  16. if (php_sapi_name( ) != 'cli') {
  17. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][1] );
  18. exit( 1 );
  19. }
  20.  
  21. if (posix_getuid( ) != 0) {
  22. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][2] );
  23. exit( 2 );
  24. }
  25.  
  26. umask( 2 );
  27. $options = getopt( 'oT:D:F:I:L:a:U:' );
  28.  
  29. if (!(isset( $options['a'] ))) {
  30. usage( );
  31. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][3] );
  32. exit( 3 );
  33. }
  34.  
  35. $action = $options['a'];
  36.  
  37. if (in_array( $action, array(
  38. 'delete',
  39. 'export',
  40. 'start',
  41. 'stop',
  42. 'wipe',
  43. 'hotlink',
  44. 'delnetwork',
  45. 'hotaddlink',
  46. 'hotdellink',
  47. 'html5Desktop',
  48. 'destroyHtml5Desktop',
  49. 'capture'
  50. ) )) {
  51. if (!(isset( $options['T'] ))) {
  52. usage( );
  53. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][4] );
  54. exit( 4 );
  55. }
  56. else if ((int) $options['T'] < 0) {
  57. usage( );
  58. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][5] );
  59. exit( 5 );
  60. }
  61. else {
  62. $tenant = (int) $options['T'];
  63. }
  64. }
  65.  
  66. if ($action == 'uploadlic') {
  67. if (!(isset( $options['L'] ))) {
  68. usage( );
  69. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][79] );
  70. exit( 79 );
  71. }
  72. else {
  73. $newlic = $options['L'];
  74. }
  75. }
  76.  
  77. if (in_array( $action, array(
  78. 'html5Desktop',
  79. 'destroyHtml5Desktop'
  80. ) )) {
  81. if (!(isset( $options['U'] ))) {
  82. usage( );
  83. exit( 4 );
  84. }
  85. else {
  86. $user = $options['U'];
  87. }
  88. }
  89.  
  90. if (in_array( $action, array(
  91. 'delete',
  92. 'export',
  93. 'start',
  94. 'stop',
  95. 'wipe',
  96. 'hotlink',
  97. 'delnetwork',
  98. 'hotaddlink',
  99. 'hotdellink',
  100. 'capture'
  101. ) )) {
  102. if (!(is_file( $options['F'] ))) {
  103. usage( );
  104. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $options['F'] . ' - ' . $GLOBALS['messages'][6] );
  105. exit( 6 );
  106. }
  107.  
  108. try {
  109. $lab = new Lab( $options['F'], $tenant );
  110. }
  111. catch (Exception $e) {
  112. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][$e->getMessage( )] );
  113. error_log( date( 'M d H:i:s ' ) . date( 'M d H:i:s ' ) . 'ERROR: ' . $GLOBALS['messages'][7] );
  114. exit( 7 );
  115. }
  116. }
  117.  
  118. if (isset( $options['D'] )) {
  119. ..........................................................................................................
  120. .......................................................
  121. ........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement