Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/extensions/admin_ui/media/javascript/ui/panel/ZombieTabs.js
1155 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
ZombieTabs = function(zombie_tree_list) {
8
9
//a variable to store the list of trees.
10
this.tree_items = new Array;
11
12
//we store the list of trees in a correct array format for ExtJs
13
for(tree_name in zombie_tree_list) {
14
var tree = zombie_tree_list[tree_name];
15
16
//set the tree as distributed if it's not the basic tree
17
if(tree_name != "basic") {
18
tree.tree_configuration["distributed"] = true;
19
}
20
21
this.tree_items.push(tree);
22
}
23
24
/*
25
* Update each tree with a new configuration and regenerates them.
26
* @param: {Literal Object} updated configuration for the trees
27
*/
28
function update_trees_configuration(configuration) {
29
var tree_panel = Ext.getCmp("zombie-tree-tabs-panel");
30
var trees = tree_panel.items;
31
32
Ext.each(trees.items, function(tree) {
33
tree.updateConfiguration(configuration);
34
tree.reload();
35
});
36
};
37
38
/* the "sort by" functionality is not used yet
39
40
//the bottom bar for that panel
41
this.bottom_bar = new Ext.Toolbar({
42
items: [
43
{
44
xtype: 'tbtext',
45
text: 'Sort by:'
46
},
47
{
48
//list the hooked browsers by domain
49
text: 'domain',
50
listeners: {
51
click: function(b) {
52
update_trees_configuration({'sub-branch' : 'domain'});
53
}
54
}
55
},
56
'-',
57
{
58
//list the hooked browsers by external ip
59
text: 'external ip',
60
listeners: {
61
click: function() {
62
alert('under construction');
63
}
64
}
65
}
66
]
67
});
68
*/
69
MainPanel.superclass.constructor.call(this, {
70
id: 'zombie-tree-tabs-panel',
71
title: 'Hooked Browsers',
72
headerAsText: true,
73
tabPosition: 'bottom',
74
region:'west',
75
activeTab: 0,
76
margins:'0 5 5 5',
77
width: 225,
78
minSize: 175,
79
maxSize: 400,
80
deferredRender: false,
81
items: this.tree_items
82
// bbar: this.bottom_bar
83
});
84
};
85
86
Ext.extend(ZombieTabs, Ext.TabPanel);
87
88