forked from j5s/vshell
-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.js
56 lines (53 loc) · 1.37 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"use strict";
const WIN = require("ui/window"); // 窗口库
const Modules = {
base_info: ["*"],
vshell_monitor: ["custom"],
av_list: ["custom"],
vshell_service: ["custom"],
vshell_screenshot: ["custom"],
vshell_procdump: ["custom"],
vshell_browserdata: ["custom"],
vshell_socks5: ["custom"],
vshell_scan: ["custom"],
vshell_shellcode: ["custom"],
};
/**
* 插件类
*/
class Plugin {
constructor(opt) {
let self = this;
self.opt = opt;
self.core = new antSword["core"][opt["type"]](opt);
let cores = {};
for (let _ in Modules) {
cores[_] = require(`./core/${_}/index`);
}
self.cores = cores;
// 创建一个 window
let win = new WIN({
title: `vshell By: veo`,
height: 650,
width: 950,
});
this.win = win;
self.main_layout = win.win.attachLayout("1C");
self.main_cell = self.main_layout.cells("a");
self.tabbar = self.main_cell.attachTabbar();
self.tabbar.setAlign("left");
self.cores_instance = [];
for (let module in Modules) {
if (
Modules[module].includes(self.opt.type) ||
Modules[module].includes("*")
) {
self.cores_instance[module] = new self.cores[module](self);
let instance = self.cores_instance[module];
instance.setName(module);
instance.createLayout(self.tabbar);
}
}
}
}
module.exports = Plugin;