Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/extensions/admin_ui/media/javascript/ui/panel/MainPanel.js
1154 views
1
//
2
// Copyright (c) 2006-2025 Wade Alcorn - [email protected]
3
// Browser Exploitation Framework (BeEF) - https://beefproject.com
4
// See the file 'doc/COPYING' for copying permission
5
//
6
7
MainPanel = function(){
8
this.preview = new Ext.Panel({
9
id: 'preview',
10
region: 'south',
11
cls:'preview',
12
autoScroll: true,
13
listeners: PanelViewer.LinkInterceptor,
14
15
tbar: [{
16
id:'tab',
17
text: 'View in New Tab',
18
iconCls: 'new-tab',
19
disabled:true,
20
handler : this.openTab,
21
scope: this
22
}],
23
24
clear: function(){
25
this.body.update('');
26
var items = this.topToolbar.items;
27
items.get('tab').disable();
28
items.get('win').disable();
29
}
30
});
31
32
33
this.logs_grid = new LogsDataGrid('/api/logs',30);
34
this.logs_grid.border = false;
35
36
this.zombies_grid = new ZombieDataGrid('/api/hooks/all', 30);
37
this.zombies_grid.border = false;
38
39
this.welcome_tab = new WelcomeTab;
40
41
this.auto_run_tab = new AutoRunTab;
42
43
MainPanel.superclass.constructor.call(this, {
44
id:'main-tabs',
45
activeTab:0,
46
region:'center',
47
margins:'0 5 5 0',
48
resizeTabs:true,
49
tabWidth:150,
50
minTabWidth: 120,
51
enableTabScroll: true,
52
plugins: new Ext.ux.TabCloseMenu(),
53
items: [{
54
id:'welcome-view',
55
title:'Getting Started',
56
layout:'border',
57
hideMode:'offsets',
58
closable:true,
59
plain:true,
60
shadow:true,
61
items:[
62
this.welcome_tab
63
]
64
},{
65
id:'logs-view',
66
layout:'border',
67
title:'Logs',
68
hideMode:'offsets',
69
items:[
70
this.logs_grid
71
]
72
},
73
{
74
id:'zombies-view',
75
layout:'border',
76
title:'Zombies',
77
hideMode:'offsets',
78
items:[
79
this.zombies_grid
80
]
81
},
82
{
83
id:'autorun-view',
84
title:'Auto Run',
85
layout:'border',
86
hideMode:'offsets',
87
items:[
88
this.auto_run_tab
89
]
90
}]
91
});
92
93
};
94
95
Ext.extend(MainPanel, Ext.TabPanel);
96
97
98
Ext.reg('appmainpanel', MainPanel);
99
100