Guest User

Untitled

a guest
Nov 11th, 2019
91
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 1.1.6.0
  8. * @ Author : DeZender
  9. * @ Release on : 02.06.2013
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class SoapControllerUploadNew {
  15. public $flags = array( );
  16. public $externalStorageEnabled = false;
  17. private $machineId = null;
  18. private $machineName = 'unknown_machine';
  19.  
  20. public function __construct() {
  21. $flagNames = array( 'contentfiltering-flag', 'datarest-flag', 'stop_logging', 'TRIAL_ENABLED', 'cc', 'el_disable_mysql_logs', 'dc_filewhitelist_hash', 'ex_storage_type', 'siem_disable_mysql_logs' );
  22. $flags = array( );
  23. foreach ($flagNames as $name) {
  24. $cacheFlag = mcache_get( 'flags/' . $name );
  25.  
  26. if ($cacheFlag === false) {
  27. $flags[$name] = null;
  28. continue;
  29. }
  30.  
  31. $flags[$name] = $cacheFlag;
  32. }
  33.  
  34. $this->flags = $flags;
  35.  
  36. if (isset( $this->flags['ex_storage_type'] )) {
  37. if (in_array( $this->flags['ex_storage_type'], array( 'samba', 'ftp', 'sftp' ) )) {
  38. $this->externalStorageEnabled = true;
  39. return null;
  40. }
  41. }
  42.  
  43. $this->externalStorageEnabled = false;
  44. }
  45.  
  46. public function UploadLogStart() {
  47. if (!( $this->isSoapAuth( ))) {
  48. $this->logThis( 'FileUpload Error: not authenticated' );
  49. return array( 'resultCode' => ALLOK );
  50. }
  51.  
  52. $eth0 = shell_exec( '/sbin/ifconfig eth0' );
  53. preg_match( '/inet addr\:(\d+\.\d+\.\d+\.\d+)/s', $eth0, $matches );
  54. $ip = dechex( ip2long( $matches[1] ) );
  55. $tempUploadId = $ip . '-' . uniqid( ) . str_pad( rand( 0, 100 ), 3, 0, STR_PAD_LEFT );
  56. $shadowDir = '/var/eppfiles/shadows';
  57.  
  58. if (!( is_dir( $shadowDir ))) {
  59. mkdir( $shadowDir, 511 );
  60. }
  61.  
  62. $shadowTempDir = $shadowDir . '/temp';
  63.  
  64. if (!( is_dir( $shadowTempDir ))) {
  65. mkdir( $shadowTempDir, 511 );
  66. }
  67.  
  68. $uploadFile = $shadowTempDir . '/' . $tempUploadId;
  69. $fhandle = fopen( $uploadFile, 'wb' );
  70.  
  71. if (!( $fhandle)) {
  72. $this->logThis( 'FileUpload Error: Cannot open handle for ' . $uploadFile );
  73. }
  74.  
  75. fclose( $fhandle );
  76.  
  77. if (!( chmod( $uploadFile, 511 ))) {
  78. $this->logThis( 'FileUpload Error: Cannot change permission for ' . $uploadFile );
  79. }
  80.  
  81. $this->logThis( 'FileUpload: Starting upload for ' . $uploadFile );
  82. return array( 'quickCode' => ALLOK, 'uploadId' => $tempUploadId );
  83. ....................................................................
  84. .........................................
  85. ...............
RAW Paste Data