__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php

/**
 * 隐藏插件,默认开启
 */
class toolsCommonPlugin extends PluginBase{
	function __construct(){
		parent::__construct();
	}
	public function regiest(){
		$this->hookRegiest(array(
			'user.commonJs.insert'	=> 'toolsCommonPlugin.echoJs'
		));
	}
	public function echoJs($st,$act){
		$this->systemBackup();
		$this->echoFile('static/main.js');
	}
	public function systemBackup(){
		$system = DATA_PATH.'system/';
		$bakcupLast = $system.'backup/last/';
		$backupLastDay = $system.'backup/day/'.date('Ymd',time()).'/';
		
		//每N天备份一次;首次备份当天
		$backupRepeat = 5;
		$day = intval(date('d',time()));
		if( !@file_exists($bakcupLast) ||
			(!@file_exists($backupLastDay) && $day % $backupRepeat == 0)
			){
			mk_dir($backupLastDay);
			$this->backupTo($backupLastDay);
		}

		//每天覆盖备份一次
		if(!@file_exists($bakcupLast)){
			mk_dir($bakcupLast);
			$this->backupTo($bakcupLast);
		}
		$lastTime = @filemtime($bakcupLast.'/system_member.php');
		if(time() - $lastTime > 60*60*24){
			$this->backupTo($bakcupLast);
		}
	}
	private function backupTo($folder){
		$system = DATA_PATH.'system/';
		$backFile = array(
			'apps.php',
			'system_group.php',
			'system_member.php',
			'system_role.php',
			'system_role_group.php',
			'system_setting.php',
			'desktop_app.php'
		);
		foreach ($backFile as $file) {
			if(file_exists($folder.$file)){
				@unlink($folder.$file);
			}
			@copy($system.$file,$folder.$file);
		}
	}

	/**
	 * ie8 css hack;
	 * @return [type] [description]
	 */
	public function pie(){
		header('Content-type: text/x-component');
		include($this->pluginPath.'/static/pie/pie.htc');
	}
}

Filemanager

Name Type Size Permission Actions
static Folder 6775
app.php File 1.62 KB 0775
package.json File 304 B 0775
Filemanager