Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 1.1.6.0
- * @ Author : DeZender
- * @ Release on : 02.06.2013
- * @ Official site : http://DeZender.Net
- *
- */
- class SoapControllerUploadNew {
- public $flags = array( );
- public $externalStorageEnabled = false;
- private $machineId = null;
- private $machineName = 'unknown_machine';
- public function __construct() {
- $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' );
- $flags = array( );
- foreach ($flagNames as $name) {
- $cacheFlag = mcache_get( 'flags/' . $name );
- if ($cacheFlag === false) {
- $flags[$name] = null;
- continue;
- }
- $flags[$name] = $cacheFlag;
- }
- $this->flags = $flags;
- if (isset( $this->flags['ex_storage_type'] )) {
- if (in_array( $this->flags['ex_storage_type'], array( 'samba', 'ftp', 'sftp' ) )) {
- $this->externalStorageEnabled = true;
- return null;
- }
- }
- $this->externalStorageEnabled = false;
- }
- public function UploadLogStart() {
- if (!( $this->isSoapAuth( ))) {
- $this->logThis( 'FileUpload Error: not authenticated' );
- return array( 'resultCode' => ALLOK );
- }
- $eth0 = shell_exec( '/sbin/ifconfig eth0' );
- preg_match( '/inet addr\:(\d+\.\d+\.\d+\.\d+)/s', $eth0, $matches );
- $ip = dechex( ip2long( $matches[1] ) );
- $tempUploadId = $ip . '-' . uniqid( ) . str_pad( rand( 0, 100 ), 3, 0, STR_PAD_LEFT );
- $shadowDir = '/var/eppfiles/shadows';
- if (!( is_dir( $shadowDir ))) {
- mkdir( $shadowDir, 511 );
- }
- $shadowTempDir = $shadowDir . '/temp';
- if (!( is_dir( $shadowTempDir ))) {
- mkdir( $shadowTempDir, 511 );
- }
- $uploadFile = $shadowTempDir . '/' . $tempUploadId;
- $fhandle = fopen( $uploadFile, 'wb' );
- if (!( $fhandle)) {
- $this->logThis( 'FileUpload Error: Cannot open handle for ' . $uploadFile );
- }
- fclose( $fhandle );
- if (!( chmod( $uploadFile, 511 ))) {
- $this->logThis( 'FileUpload Error: Cannot change permission for ' . $uploadFile );
- }
- $this->logThis( 'FileUpload: Starting upload for ' . $uploadFile );
- return array( 'quickCode' => ALLOK, 'uploadId' => $tempUploadId );
- ....................................................................
- .........................................
- ...............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement