Bugfix/browse offline zombies (#2388)

* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fiexed a small mistake in a comment

(cherry picked from commit fed79d7142)

* Revert "- Fix for offline browsers. Allowing you to view all executed commands in the past and details. - fiexed a small mistake in a comment"

This reverts commit fed79d71

* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fiexed a small mistake in a comment

* - Fix for offline browsers. Allowing you to view all executed commands in the past and details.
- fixed a small mistake in a comment"

Co-authored-by: Whacko <not@gonna.tel>
This commit is contained in:
iWhacko
2022-06-24 07:39:47 +02:00
committed by GitHub
parent 0221a1c7da
commit b56345fcdf
2 changed files with 9 additions and 6 deletions

View File

@@ -51,27 +51,29 @@ var ZombiesMgr = function(zombies_tree_lists) {
* Update the hooked browser trees * Update the hooked browser trees
* @param: {Literal Object} an object containing the list of offline and online hooked browsers. * @param: {Literal Object} an object containing the list of offline and online hooked browsers.
*/ */
this.updateZombies = function(zombies){ this.updateZombies = function(hooked_browsers){
var offline_hooked_browsers = zombies["offline"]; var offline_hooked_browsers = hooked_browsers["offline"];
var online_hooked_browsers = zombies["online"]; var online_hooked_browsers = hooked_browsers["online"];
beefwui.hooked_browsers = zombies["online"]; var new_zombie_list = new Array();
for(tree_type in this.zombies_tree_lists) { for(tree_type in this.zombies_tree_lists) {
hooked_browsers_tree = this.zombies_tree_lists[tree_type]; hooked_browsers_tree = this.zombies_tree_lists[tree_type];
//we compare and remove the hooked browsers from online and offline branches for each tree. //we compare and remove the hooked browsers from online and offline branches for each tree.
hooked_browsers_tree.compareAndRemove(zombies); hooked_browsers_tree.compareAndRemove(hooked_browsers);
//add an offline browser to the tree //add an offline browser to the tree
for(var i in offline_hooked_browsers) { for(var i in offline_hooked_browsers) {
var offline_hooked_browser = this.zombieFactory(i, offline_hooked_browsers); var offline_hooked_browser = this.zombieFactory(i, offline_hooked_browsers);
hooked_browsers_tree.addZombie(offline_hooked_browser, false, ((tree_type != 'basic') ? true : false)); hooked_browsers_tree.addZombie(offline_hooked_browser, false, ((tree_type != 'basic') ? true : false));
new_zombie_list.push(offline_hooked_browser);
} }
//add an online browser to the tree //add an online browser to the tree
for(var i in online_hooked_browsers) { for(var i in online_hooked_browsers) {
var online_hooked_browser = this.zombieFactory(i, online_hooked_browsers); var online_hooked_browser = this.zombieFactory(i, online_hooked_browsers);
hooked_browsers_tree.addZombie(online_hooked_browser, true, ((tree_type != 'basic') ? true : false)); hooked_browsers_tree.addZombie(online_hooked_browser, true, ((tree_type != 'basic') ? true : false));
new_zombie_list.push(online_hooked_browser);
} }
//expand the online hooked browser tree lists //expand the online hooked browser tree lists
@@ -85,5 +87,6 @@ var ZombiesMgr = function(zombies_tree_lists) {
} }
} }
beefwui.hooked_browsers = new_zombie_list;
} }
}; };

View File

@@ -240,7 +240,7 @@ try{
this.addZombie(offline_hooked_browser, offline_hooked_browser["online"], offline_hooked_browser["checkbox"]); this.addZombie(offline_hooked_browser, offline_hooked_browser["online"], offline_hooked_browser["checkbox"]);
}, this) }, this)
//expands the online hooked browser branch //expands the offline hooked browser branch
if(this.offline_hooked_browsers_treenode.childNodes.length > 0) if(this.offline_hooked_browsers_treenode.childNodes.length > 0)
this.offline_hooked_browsers_treenode.expand(true); this.offline_hooked_browsers_treenode.expand(true);
}, },