diff --git a/plugins/beta/beta_main.py b/plugins/beta/beta_main.py
deleted file mode 100755
index 6c1965ffe..000000000
--- a/plugins/beta/beta_main.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/python
-#coding: utf-8
-#-----------------------------
-# 宝塔Linux面板内测插件
-#-----------------------------
-import sys,os
-reload(sys)
-sys.setdefaultencoding('utf-8')
-os.chdir('/www/server/panel');
-sys.path.append("class/")
-import public,db,time
-
-class beta_main:
- __setupPath = '/www/server/panel/plugin/beta';
- #设置内测
- def SetConfig(self,get):
- data = {}
- data['username'] = get.bbs_name
- data['qq'] = get.qq
- data['email'] = get.email
- result = public.httpPost('https://www.bt.cn/Api/LinuxBeta',data);
- import json;
- data = json.loads(result);
- if data['status']:
- public.writeFile(self.__setupPath + '/config.conf',get.bbs_name + '|' + get.qq + '|' + get.email);
- return data;
- #取内测资格状态
- def GetConfig(self,get):
- try:
- cfile = self.__setupPath + '/config.conf'
- if not os.path.exists(cfile): cfile = 'data/beta.pl'
- return public.readFile(cfile).strip();
- except:
- return 'False';
diff --git a/plugins/beta/index.html b/plugins/beta/index.html
deleted file mode 100755
index 42cdc1c99..000000000
--- a/plugins/beta/index.html
+++ /dev/null
@@ -1,86 +0,0 @@
-
-
-
恭喜您,成为内测组的一员!
-
您的宝塔论坛认证用户为:
-
您可以用这个账号在内测专用版块反馈交流,宝塔论坛内测专用版块
-
如果您想返回正式版,则直接SSH里再执行安装代码即可
-
-
\ No newline at end of file
diff --git a/plugins/beta/info.json b/plugins/beta/info.json
deleted file mode 100755
index 1ccec7589..000000000
--- a/plugins/beta/info.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title":"申请内测",
- "tip":"lib",
- "name":"beta",
- "type":"扩展",
- "ps":"申请内测资格,审核完成后将会获得内测版本更新推送,并可在宝塔论坛内测专用版块参与讨论",
- "versions":"1.2",
- "shell":"beta.sh",
- "checks":"/www/server/panel/plugin/beta",
- "author":"宝塔",
- "home":"http://www.bt.cn/bbs",
- "date":"2017-10-16",
- "default":false,
- "display":0,
- "pid":"2"
-}
\ No newline at end of file
diff --git a/plugins/beta/install.sh b/plugins/beta/install.sh
deleted file mode 100755
index e34049769..000000000
--- a/plugins/beta/install.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
-export PATH
-install_tmp='/tmp/bt_install.pl'
-CN='125.88.182.172'
-HK='download.bt.cn'
-HK2='103.224.251.67'
-US='128.1.164.196'
-sleep 0.5;
-CN_PING=`ping -c 1 -w 1 $CN|grep time=|awk '{print $7}'|sed "s/time=//"`
-HK_PING=`ping -c 1 -w 1 $HK|grep time=|awk '{print $7}'|sed "s/time=//"`
-HK2_PING=`ping -c 1 -w 1 $HK2|grep time=|awk '{print $7}'|sed "s/time=//"`
-US_PING=`ping -c 1 -w 1 $US|grep time=|awk '{print $7}'|sed "s/time=//"`
-
-echo "$HK_PING $HK" > ping.pl
-echo "$HK2_PING $HK2" >> ping.pl
-echo "$US_PING $US" >> ping.pl
-echo "$CN_PING $CN" >> ping.pl
-nodeAddr=`sort -V ping.pl|sed -n '1p'|awk '{print $2}'`
-if [ "$nodeAddr" == "" ];then
- nodeAddr=$HK2
-fi
-
-download_Url=http://$nodeAddr:5880
-
-Install_Beta()
-{
- mkdir -p /www/server/panel/plugin/beta
- f1=/www/server/panel/data/beta.pl
- if [ ! -f "$f1" ];then
- echo 'False' > $f1
- fi
- f2=/www/server/panel/plugin/beta/config.conf
- if [ ! -f "$f2" ];then
- echo 'False' > $f2
- fi
- echo '正在安装脚本文件...' > $install_tmp
- wget -O /www/server/panel/plugin/beta/beta_main.py $download_Url/install/lib/plugin/beta/beta_main.py -T 5
- wget -O /www/server/panel/plugin/beta/index.html $download_Url/install/lib/plugin/beta/index.html -T 5
- wget -O /www/server/panel/plugin/beta/info.json $download_Url/install/lib/plugin/beta/info.json -T 5
- echo '安装完成' > $install_tmp
-}
-
-Uninstall_Beta()
-{
- rm -rf /www/server/panel/plugin/beta
- rm -f /www/server/panel/data/beta.pl
-}
-
-
-action=$1
-if [ "${1}" == 'install' ];then
- Install_Beta
-else
- Uninstall_Beta
-fi
diff --git a/plugins/btyw/btyw_main.py b/plugins/btyw/btyw_main.py
deleted file mode 100755
index ba7dd023b..000000000
--- a/plugins/btyw/btyw_main.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/python
-#coding: utf-8
-#-----------------------------
-# 宝塔Linux面板网站备份工具 - ALIOSS
-#-----------------------------
-import sys,os
-reload(sys)
-sys.setdefaultencoding('utf-8')
-os.chdir('/www/server/panel');
-sys.path.append("class/")
-import public,web
-
-class btyw_main:
- def GetIndex(self,get):
- try:
- if hasattr(web.ctx.session,'btyw'): return False;
- result = public.httpGet('https://www.bt.cn/lib/btyw.html');
- public.writeFile('/www/server/panel/plugin/btyw/index.html',result);
- web.ctx.session.btyw = True;
- return True;
- except:
- return False;
\ No newline at end of file
diff --git a/plugins/btyw/ico-btyw.png b/plugins/btyw/ico-btyw.png
deleted file mode 100755
index 8f97a9c15..000000000
Binary files a/plugins/btyw/ico-btyw.png and /dev/null differ
diff --git a/plugins/btyw/ico-hot.png b/plugins/btyw/ico-hot.png
deleted file mode 100755
index e3bb4749e..000000000
Binary files a/plugins/btyw/ico-hot.png and /dev/null differ
diff --git a/plugins/btyw/icon.png b/plugins/btyw/icon.png
deleted file mode 100755
index 8f97a9c15..000000000
Binary files a/plugins/btyw/icon.png and /dev/null differ
diff --git a/plugins/btyw/index.html b/plugins/btyw/index.html
deleted file mode 100755
index 679af3c62..000000000
--- a/plugins/btyw/index.html
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
宝塔运维,一对一技术服务,承诺如解决不好,款项立即全额原路退回,请放心付费后咨询。
-
-
-
- | 服务类型 |
- 服务范围 |
- 服务价格 |
- 购买服务 |
-
-
-
-
- | 企业托管运维 |
- 定制化企业托管服务,如有需要可咨询技术 |
- 5000元/年起 |
- 立即前往 |
-
-
- | 宝塔面板安装 |
- 安装好宝塔面板及指定环境,并做好服务器安全设置 |
- 原价200元起 限时特价80元 |
- 立即前往 |
-
-
- | 系统优化加速 |
- 网站加速、系统优化、环境优化,让性能更上一台阶 |
- 300元/次起 |
- 立即前往 |
-
-
- | 数据同步服务 |
- 部署SQL SERVER或MySQL数据库实时热备功能 |
- 300元/次起 |
- 立即前往 |
-
-
- | 网站挂马清理 |
- 手工查找并清理网站的各种挂马代码 |
- 500元/次起 |
- 立即前往 |
-
-
- | 面板问题处理 |
- 解决面板打不开、部分功能无法正常使用等问题 |
- 原价200元起 限时特价80元 |
- 立即前往 |
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/btyw/info.json b/plugins/btyw/info.json
deleted file mode 100755
index b2aa9fe3e..000000000
--- a/plugins/btyw/info.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "pid":9,
- "title":"宝塔运维",
- "tip":"lib",
- "name":"btyw",
- "type":"插件",
- "id":2,
- "sort":1001,
- "ps":"宝塔付费运维服务",
- "versions":"1.0",
- "shell":"btyw.sh",
- "checks":"/www/server/panel/plugin/btyw",
- "author":"宝塔",
- "home":"https://www.bt.cn/yunwei",
- "date":"2017-10-18",
- "default":false,
- "display":0,
- "pid":"2"
-}
\ No newline at end of file
diff --git a/plugins/btyw/install.sh b/plugins/btyw/install.sh
deleted file mode 100755
index 799c8ee08..000000000
--- a/plugins/btyw/install.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
-export PATH
-install_tmp='/tmp/bt_install.pl'
-CN='125.88.182.172'
-HK='download.bt.cn'
-HK2='103.224.251.67'
-US='174.139.221.74'
-sleep 0.5;
-CN_PING=`ping -c 1 -w 1 $CN|grep time=|awk '{print $7}'|sed "s/time=//"`
-HK_PING=`ping -c 1 -w 1 $HK|grep time=|awk '{print $7}'|sed "s/time=//"`
-HK2_PING=`ping -c 1 -w 1 $HK2|grep time=|awk '{print $7}'|sed "s/time=//"`
-US_PING=`ping -c 1 -w 1 $US|grep time=|awk '{print $7}'|sed "s/time=//"`
-
-echo "$HK_PING $HK" > ping.pl
-echo "$HK2_PING $HK2" >> ping.pl
-echo "$US_PING $US" >> ping.pl
-echo "$CN_PING $CN" >> ping.pl
-nodeAddr=`sort -V ping.pl|sed -n '1p'|awk '{print $2}'`
-if [ "$nodeAddr" == "" ];then
- nodeAddr=$HK2
-fi
-
-download_Url=http://$nodeAddr:5880
-
-Install_btyw()
-{
- mkdir -p /www/server/panel/plugin/btyw
- echo '正在安装脚本文件...' > $install_tmp
- wget -O /www/server/panel/plugin/btyw/btyw_main.py $download_Url/install/lib/plugin/btyw/btyw_main.py -T 5
- wget -O /www/server/panel/plugin/btyw/index.html $download_Url/install/lib/plugin/btyw/index.html -T 5
- wget -O /www/server/panel/plugin/btyw/info.json $download_Url/install/lib/plugin/btyw/info.json -T 5
- wget -O /www/server/panel/plugin/btyw/icon.png $download_Url/install/lib/plugin/btyw/icon.png -T 5
- wget -O /www/server/panel/static/img/soft_ico/ico-btyw.png $download_Url/install/lib/plugin/btyw/icon.png -T 5
- wget -O /www/server/panel/static/images/ico-hot.png $download_Url/install/lib/plugin/btyw/ico-hot.png -T 5
-
- echo '安装完成' > $install_tmp
-}
-
-Uninstall_btyw()
-{
- rm -rf /www/server/panel/plugin/btyw
- pip uninstall btyw -y
-}
-
-
-action=$1
-if [ "${1}" == 'install' ];then
- Install_btyw
-else
- Uninstall_btyw
-fi
diff --git a/plugins/safelogin/icon.png b/plugins/safelogin/icon.png
deleted file mode 100755
index 379c72b0a..000000000
Binary files a/plugins/safelogin/icon.png and /dev/null differ
diff --git a/plugins/safelogin/index.html b/plugins/safelogin/index.html
deleted file mode 100755
index cf0b57f1b..000000000
--- a/plugins/safelogin/index.html
+++ /dev/null
@@ -1,550 +0,0 @@
-
-
-
-
-
- 未开通此服务,如需使用请开通企业运维版。
-
-
-
1、一对一运维人员对接
-
2、提供每月3次运维服务
-
3、双重安全隔离登录
-
-
- 企业运维版98元/月
-
-
-
-
-
-
\ No newline at end of file
diff --git a/plugins/safelogin/info.json b/plugins/safelogin/info.json
deleted file mode 100755
index 3fe4c2b42..000000000
--- a/plugins/safelogin/info.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "title":"宝塔安全登录",
- "tip":"lib",
- "name":"safelogin",
- "type":"扩展",
- "ps":"宝塔企业版安全登陆插件!",
- "versions":"1.3",
- "shell":"safelogin.sh",
- "checks":"/www/server/panel/plugin/safelogin",
- "author":"宝塔",
- "home":"http://www.bt.cn/bbs",
- "date":"2017-11-24",
- "default":false,
- "display":0,
- "pid":"3"
-}
\ No newline at end of file
diff --git a/plugins/safelogin/install.sh b/plugins/safelogin/install.sh
deleted file mode 100755
index 6965e237a..000000000
--- a/plugins/safelogin/install.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/bash
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
-export PATH
-install_tmp='/tmp/bt_install.pl'
-public_file=/www/server/panel/install/public.sh
-if [ ! -f $public_file ];then
- wget -O $public_file http://download.bt.cn/install/public.sh -T 5;
-fi
-. $public_file
-
-download_Url=$NODE_URL
-
-Install_safelogin()
-{
- mkdir -p /www/server/panel/plugin/safelogin
- echo '正在安装脚本文件...' > $install_tmp
- wget -O /www/server/panel/plugin/safelogin/safelogin_main.py $download_Url/install/lib/plugin/safelogin/safelogin_main.py -T 5
- wget -O /www/server/panel/plugin/safelogin/index.html $download_Url/install/lib/plugin/safelogin/index.html -T 5
- wget -O /www/server/panel/plugin/safelogin/info.json $download_Url/install/lib/plugin/safelogin/info.json -T 5
- wget -O /www/server/panel/plugin/safelogin/icon.png $download_Url/install/lib/plugin/safelogin/icon.png -T 5
- echo '安装完成' > $install_tmp
-
-}
-
-Uninstall_safelogin()
-{
- chattr -i /www/server/panel/plugin/safelogin/token.pl
- rm -f /www/server/panel/data/limitip.conf
- sed -i "/ALL/d" /etc/hosts.deny
- rm -rf /www/server/panel/plugin/safelogin
-}
-
-
-action=$1
-host=$2;
-if [ "${1}" == 'install' ];then
- Install_safelogin
-else
- Uninstall_safelogin
-fi
diff --git a/plugins/safelogin/safelogin_main.py b/plugins/safelogin/safelogin_main.py
deleted file mode 100755
index 6c92f4533..000000000
--- a/plugins/safelogin/safelogin_main.py
+++ /dev/null
@@ -1,276 +0,0 @@
-#coding: utf-8
-# +-------------------------------------------------------------------
-# | 宝塔Linux面板 x3
-# +-------------------------------------------------------------------
-# | Copyright (c) 2015-2017 宝塔软件(http://bt.cn) All rights reserved.
-# +-------------------------------------------------------------------
-# | Author: 黄文良 <287962566@qq.com>
-# +-------------------------------------------------------------------
-
-#+--------------------------------------------------------------------
-#| 宝塔安全登陆插件
-#+--------------------------------------------------------------------
-import sys;
-sys.path.append('class/');
-reload(sys);
-import public,json,os,time,binascii,urllib,re,web;
-class safelogin_main:
- __PANEL_SSL = None;
- __PDATA = None;
- __APIURL = 'http://www.bt.cn/api/Auth';
- __UPATH = 'data/userInfo.json';
- __DENY = '/etc/hosts.deny';
- __ALLOW = '/etc/hosts.allow';
- __LIMIT_CONF = 'data/limitip.conf';
- __userInfo = None;
- def __init__(self):
- pdata = {}
- data = {}
- if os.path.exists(self.__UPATH):
- self.__userInfo = json.loads(public.readFile(self.__UPATH));
- if self.__userInfo:
- pdata['access_key'] = self.__userInfo['access_key'];
- data['secret_key'] = self.__userInfo['secret_key'];
- else:
- pdata['access_key'] = 'test';
- data['secret_key'] = '123456';
- pdata['data'] = data;
- self.__PDATA = pdata;
-
- #生成并发送Token
- def SendToken(self,get = None):
- return False;
-
- #获取服务器密钥
- def GetServerToken(self,get):
- password = public.M('users').where('id=?',(1,)).getField('password');
- if password != public.md5(get.password): return public.returnMsg(False,'密码验证失败!');
- tokenFile = '/www/server/panel/plugin/safelogin/token.pl';
- if not os.path.exists(tokenFile):
- tokenStr = public.GetRandomString(64);
- public.writeFile(tokenFile,tokenStr);
- else:
- tokenStr = public.readFile(tokenFile);
- public.ExecShell('chattr +i ' + tokenFile);
- return tokenStr.strip();
-
- #获取服务器信息
- def GetServerInfo(self,get):
- #self.SendToken();
- self.__init__();
- self.__PDATA['data'] = self.De_Code(self.__PDATA['data']);
- result = json.loads(public.httpPost(self.__APIURL + '/GetServerInfo',self.__PDATA));
- result['data'] = self.En_Code(result['data']);
- return result;
-
- #获取Token
- def GetToken(self,get):
- data = {}
- data['username'] = get.username;
- data['password'] = public.md5(get.password);
- pdata = {}
- pdata['data'] = self.De_Code(data);
- result = json.loads(public.httpPost(self.__APIURL+'/GetToken',pdata));
- result['data'] = self.En_Code(result['data']);
- if result['data']: public.writeFile(self.__UPATH,json.dumps(result['data']));
- del(result['data']);
- return result;
-
- #获取节点列表
- def get_node_list(self,get):
- self.__PDATA['data'] = self.De_Code(self.__PDATA['data']);
- result = json.loads(public.httpPost(self.__APIURL + '/GetNodeList',self.__PDATA));
- result['data'] = self.En_Code(result['data']);
- return result;
-
- #添加SSH许可IP
- def add_ssh_limit(self,get):
- ip = get.ip;
- denyConf = public.readFile(self.__DENY);
- if denyConf.find('sshd:ALL') == -1:
- while denyConf[-1:] == "\n" or denyConf[-1:] == " ": denyConf = denyConf[:-1];
- denyConf += "\nsshd:ALL\n";
- public.writeFile(self.__DENY,denyConf);
- if ip in self.get_ssh_limit(): return public.returnMsg(True,'指定IP白名单已存在!');
-
- allowConf = public.readFile(self.__ALLOW).strip();
- while allowConf[-1:] == "\n" or allowConf[-1:] == " ": allowConf = allowConf[:-1];
- allowConf += "\nsshd:" + ip+":allow\n";
- public.writeFile(self.__ALLOW,allowConf);
-
- if ip in self.get_ssh_limit(): return public.returnMsg(True,'添加成功!');
- return public.returnMsg(False,'添加失败!');
-
- #删除SSH许可IP
- def remove_ssh_limit(self,get):
- ip = get.ip;
- if not ip in self.get_ssh_limit(): return public.returnMsg(True,'指定白名单不存在!');
- allowConf = public.readFile(self.__ALLOW).strip();
- while allowConf[-1:] == "\n" or allowConf[-1:] == " ": allowConf = allowConf[:-1];
- allowConf = re.sub("\nsshd:"+ip+":allow\n?","\n",allowConf);
- public.writeFile(self.__ALLOW,allowConf+"\n");
- return public.returnMsg(True,'删除成功!');
-
- #获取当前SSH许可IP
- def get_ssh_limit(self,get = None):
- allowConf = public.readFile(self.__ALLOW);
- return re.findall("sshd:(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}):allow",allowConf);
-
- #获取登陆记录
- def get_login_log(self,get):
- return public.M('logs').where('type=?',(u'用户登录',)).field('log,addtime').select();
-
- #取当前面板登陆许可
- def get_panel_limit(self,get = None):
- conf = public.readFile(self.__LIMIT_CONF)
- if not conf: conf = '';
- limitIp = conf.split(',');
- if '' in limitIp: limitIp.remove('');
- return limitIp;
-
- #添加面板许可登陆IP
- def add_panel_limit(self,get):
- limitIp = self.get_panel_limit();
- if get.ip in limitIp: return public.returnMsg(True,'指定IP白名单已存在!');
- limitIp.append(get.ip);
- public.writeFile(self.__LIMIT_CONF,','.join(limitIp));
- return public.returnMsg(True,'添加成功!');
-
- #删除面板许可登陆IP
- def remove_panel_limit(self,get):
- limitIp = self.get_panel_limit();
- if not get.ip in limitIp: return public.returnMsg(True,'指定IP白名单不存在!');
- limitIp.remove(get.ip);
- public.writeFile(self.__LIMIT_CONF,','.join(limitIp));
- return public.returnMsg(True,'删除成功!');
-
- #清除SSH许可限制
- def close_ssh_limit(self,get):
- #清除白名单
- allowConf = public.readFile(self.__ALLOW);
- allowConf = re.sub("\n\s*sshd:\w{1,3}\.\w{1,3}\.\w{1,3}\.\w{1,3}:allow",'',allowConf);
- public.writeFile(self.__ALLOW,allowConf);
-
- #关闭限制
- denyConf = public.readFile(self.__DENY);
- denyConf = re.sub("sshd:ALL\s*","",denyConf);
- public.writeFile(self.__DENY,denyConf);
- return public.returnMsg(True,'清除成功!');
-
- #清除面板登陆许可
- def close_panel_limit(self,get):
- if os.path.exists(self.__LIMIT_CONF): os.remove(self.__LIMIT_CONF);
- return public.returnMsg(True,'已关闭IP限制!');
-
- #获取操作系统信息
- def get_system_info(self,get):
- import system;
- s = system.system();
- data = s.GetSystemTotal(get,0.1);
- data['disk'] = s.GetDiskInfo2();
- return data;
-
- #获取环境信息
- def get_service_info(self,get):
- import system;
- serviceInfo = system.system().GetConcifInfo(get);
- del(serviceInfo['mysql_root']);
- return serviceInfo;
-
- #获取用户绑定信息
- def get_user_info(self,get):
- return self.__userInfo;
-
- #设置用户绑定信息
- def set_user_info(self,get):
- data = {}
- data['username'] = get.username;
- data['password'] = public.md5(get.password);
- pdata = {}
- pdata['data'] = self.De_Code(data);
- result = json.loads(public.httpPost(self.__APIURL+'/GetToken',pdata));
- result['data'] = self.En_Code(result['data']);
- if result['data']: public.writeFile(self.__UPATH,json.dumps(result['data']));
- del(result['data']);
- return result;
-
-
- #获取SSH爆破次数
- def get_ssh_errorlogin(self,get):
- path = '/var/log/secure'
- if not os.path.exists(path): public.writeFile(path,'');
- fp = open(path,'r');
- l = fp.readline();
- data = {};
- data['intrusion'] = [];
- data['intrusion_total'] = 0;
-
- data['defense'] = [];
- data['defense_total'] = 0;
-
- data['success'] = [];
- data['success_total'] = 0;
-
- limit = 100;
- while l:
- if l.find('Failed password for root') != -1:
- if len(data['intrusion']) > limit: del(data['intrusion'][0]);
- data['intrusion'].append(l);
- data['intrusion_total'] += 1;
- elif l.find('Accepted') != -1:
- if len(data['success']) > limit: del(data['success'][0]);
- data['success'].append(l);
- data['success_total'] += 1;
- elif l.find('refused') != -1:
- if len(data['defense']) > limit: del(data['defense'][0]);
- data['defense'].append(l);
- data['defense_total'] += 1;
- l = fp.readline();
-
- months = {'Jan':'01','Feb':'02','Mar':'03','Apr':'04','May':'05','Jun':'06','Jul':'07','Aug':'08','Sept':'09','Oct':'10','Nov':'11','Dec':'12'}
-
- intrusion = [];
- for g in data['intrusion']:
- tmp = {}
- tmp1 = g.split();
- tmp['date'] = months[tmp1[0]] + '/' + tmp1[1] + ' ' + tmp1[2];
- tmp['user'] = tmp1[8];
- tmp['address'] = tmp1[10];
- intrusion.append(tmp);
-
- data['intrusion'] = intrusion;
-
- success = [];
- for g in data['success']:
- tmp = {}
- tmp1 = g.split();
- tmp['date'] = months[tmp1[0]] + '/' + tmp1[1] + ' ' + tmp1[2];
- tmp['user'] = tmp1[8];
- tmp['address'] = tmp1[10];
- success.append(tmp);
- data['success'] = success;
-
- defense = []
- for g in data['defense']:
- tmp = {}
- tmp1 = g.split();
- tmp['date'] = months[tmp1[0]] + '/' + tmp1[1] + ' ' + tmp1[2];
- tmp['user'] = '-';
- tmp['address'] = tmp1[8];
- defense.append(tmp);
- data['defense'] = defense;
- import firewalls;
- data['ssh'] = firewalls.firewalls().GetSshInfo(get);
- return data;
-
- #加密数据
- def De_Code(self,data):
- pdata = urllib.urlencode(data);
- return binascii.hexlify(pdata);
-
- #解密数据
- def En_Code(self,data):
- result = urllib.unquote(binascii.unhexlify(data));
- return json.loads(result);
-
-
\ No newline at end of file