Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
beefproject
GitHub Repository: beefproject/beef
Path: blob/master/extensions/admin_ui/media/javascript/ui/panel/PanelStatusBar.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
/*
8
* The Beef_StatusBar class provides the functionality of the status bar
9
* at the bottom of each tab in the UI
10
*
11
* @param: {String} unique string for setting the status bar id.
12
*
13
*/
14
15
Beef_StatusBar = function(unique_id) {
16
17
var update_fail_wait = 2000; // delay before showing ready status
18
var update_sent_wait = 1000; // delay before showing ready status
19
20
Beef_StatusBar.superclass.constructor.call(this, {
21
id: 'commands-bbar-zombie-' + unique_id,
22
23
// defaults to use when the status is cleared:
24
defaultText: 'Ready',
25
defaultIconCls: 'x-status-valid',
26
27
// values to set initially:
28
text: 'Ready',
29
iconCls: 'x-status-valid',
30
31
// update status bar to ready
32
update_ready: function(str) {
33
var display_str = str || "Ready";
34
this.setStatus({
35
text: display_str,
36
iconCls: 'x-status-valid'
37
});
38
},
39
40
// update status bar to fail
41
update_fail: function(str){
42
var display_str = str || "Error!";
43
44
this.setStatus({
45
text: display_str,
46
iconCls: 'x-status-error',
47
clear: {
48
wait: update_fail_wait,
49
anim: true,
50
useDefaults: true
51
}
52
});
53
},
54
55
// update status bar to sending
56
update_sending: function(str) {
57
var display_str = str || "Sending...";
58
this.showBusy(display_str);
59
},
60
61
// update status bar to sent
62
update_sent: function(str) {
63
var display_str = str || "Sent";
64
this.setStatus({
65
text: display_str,
66
iconCls: 'x-status-valid',
67
clear: {
68
wait: update_sent_wait,
69
anim: true,
70
useDefaults: true
71
}
72
});
73
}
74
75
});
76
77
};
78
79
Ext.extend(Beef_StatusBar, Ext.ux.StatusBar, {} );
80
81
82