Path: blob/master/extensions/admin_ui/media/javascript/ui/panel/ZombieTabs.js
1155 views
//1// Copyright (c) 2006-2025 Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56ZombieTabs = function(zombie_tree_list) {78//a variable to store the list of trees.9this.tree_items = new Array;1011//we store the list of trees in a correct array format for ExtJs12for(tree_name in zombie_tree_list) {13var tree = zombie_tree_list[tree_name];1415//set the tree as distributed if it's not the basic tree16if(tree_name != "basic") {17tree.tree_configuration["distributed"] = true;18}1920this.tree_items.push(tree);21}2223/*24* Update each tree with a new configuration and regenerates them.25* @param: {Literal Object} updated configuration for the trees26*/27function update_trees_configuration(configuration) {28var tree_panel = Ext.getCmp("zombie-tree-tabs-panel");29var trees = tree_panel.items;3031Ext.each(trees.items, function(tree) {32tree.updateConfiguration(configuration);33tree.reload();34});35};3637/* the "sort by" functionality is not used yet3839//the bottom bar for that panel40this.bottom_bar = new Ext.Toolbar({41items: [42{43xtype: 'tbtext',44text: 'Sort by:'45},46{47//list the hooked browsers by domain48text: 'domain',49listeners: {50click: function(b) {51update_trees_configuration({'sub-branch' : 'domain'});52}53}54},55'-',56{57//list the hooked browsers by external ip58text: 'external ip',59listeners: {60click: function() {61alert('under construction');62}63}64}65]66});67*/68MainPanel.superclass.constructor.call(this, {69id: 'zombie-tree-tabs-panel',70title: 'Hooked Browsers',71headerAsText: true,72tabPosition: 'bottom',73region:'west',74activeTab: 0,75margins:'0 5 5 5',76width: 225,77minSize: 175,78maxSize: 400,79deferredRender: false,80items: this.tree_items81// bbar: this.bottom_bar82});83};8485Ext.extend(ZombieTabs, Ext.TabPanel);868788