From a021cfe4c1f4d06d16ea29595ac700454c979cd7 Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Thu, 9 Jul 2020 17:24:23 +1000 Subject: [PATCH 1/3] Provided correct context in locationHashChanged() to have data necessary for the nested function calls to act as intended. --- extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js b/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js index 6fe58e29df..a8226ef39c 100644 --- a/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js +++ b/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js @@ -91,11 +91,13 @@ function locationHashChanged() { if (id === null) return; + var zombie = Object.values(beefwui.hooked_browsers).find(hb => hb.session === location_hash('id')); + id = id.replace(/[^a-z0-9]/gi, ''); console.log("Loading hooked browser with ID: " + id); mainPanel.remove(mainPanel.getComponent('current-browser')); if(!mainPanel.getComponent('current-browser')) { - mainPanel.add(new ZombieTab({session: id})); + mainPanel.add(new ZombieTab(zombie)); } mainPanel.activate(mainPanel.getComponent('current-browser')); From 76a2ac95746575c8019fa0acfc699f7166881988 Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Thu, 9 Jul 2020 17:48:20 +1000 Subject: [PATCH 2/3] Tiny refactor --- config.yaml | 2 +- extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index d4d93e81b9..64039f64ff 100644 --- a/config.yaml +++ b/config.yaml @@ -18,7 +18,7 @@ beef: # Used by both the RESTful API and the Admin interface credentials: user: "beef" - passwd: "beef" + passwd: "beef1" # Interface / IP restrictions restrictions: diff --git a/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js b/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js index a8226ef39c..23bbea15af 100644 --- a/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js +++ b/extensions/admin_ui/media/javascript/ui/panel/PanelViewer.js @@ -91,7 +91,7 @@ function locationHashChanged() { if (id === null) return; - var zombie = Object.values(beefwui.hooked_browsers).find(hb => hb.session === location_hash('id')); + var zombie = Object.values(beefwui.hooked_browsers).find(hb => hb.session === id); id = id.replace(/[^a-z0-9]/gi, ''); console.log("Loading hooked browser with ID: " + id); From 177825e4a4aa31a390eef5b2953e544a5a6a2e63 Mon Sep 17 00:00:00 2001 From: Jack Walker Date: Thu, 9 Jul 2020 17:48:35 +1000 Subject: [PATCH 3/3] Reset config.yaml creds --- config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.yaml b/config.yaml index 64039f64ff..d4d93e81b9 100644 --- a/config.yaml +++ b/config.yaml @@ -18,7 +18,7 @@ beef: # Used by both the RESTful API and the Admin interface credentials: user: "beef" - passwd: "beef1" + passwd: "beef" # Interface / IP restrictions restrictions: