From a0539e2f33ecfa0b0639d95678533db4254fb20c Mon Sep 17 00:00:00 2001 From: "wade@bindshell.net" Date: Fri, 29 Jul 2011 14:52:07 +0000 Subject: [PATCH] the detect scripts module has been removed as it now runs by default and outputs to the details tab git-svn-id: https://beef.googlecode.com/svn/trunk@1131 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9 --- .../browser/detect_scripts_support/command.js | 75 ------------------- .../detect_scripts_support/config.yaml | 25 ------- .../browser/detect_scripts_support/module.rb | 29 ------- 3 files changed, 129 deletions(-) delete mode 100644 modules/browser/detect_scripts_support/command.js delete mode 100644 modules/browser/detect_scripts_support/config.yaml delete mode 100644 modules/browser/detect_scripts_support/module.rb diff --git a/modules/browser/detect_scripts_support/command.js b/modules/browser/detect_scripts_support/command.js deleted file mode 100644 index ea084d3cd..000000000 --- a/modules/browser/detect_scripts_support/command.js +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright 2011 Wade Alcorn wade@bindshell.net -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -beef.execute(function() { - -function serialize(_obj) -{ - // Let Gecko browsers do this the easy way - if (typeof _obj.toSource !== 'undefined' && typeof _obj.callee === 'undefined') - { - return _obj.toSource(); - } - - // Other browsers must do it the hard way - switch (typeof _obj) - { - // numbers, booleans, and functions are trivial: - // just return the object itself since its default .toString() - // gives us exactly what we want - case 'number': - case 'boolean': - case 'function': - return _obj; - break; - - // for JSON format, strings need to be wrapped in quotes - case 'string': - return '\'' + _obj + '\''; - break; - - case 'object': - var str; - if (_obj.constructor === Array || typeof _obj.callee !== 'undefined') - { - str = '['; - var i, len = _obj.length; - for (i = 0; i < len-1; i++) { str += serialize(_obj[i]) + ','; } - str += serialize(_obj[i]) + ']'; - } - else - { - str = '{'; - var key; - for (key in _obj) { str += key + ':' + serialize(_obj[key]) + ','; } - str = str.replace(/\,$/, '') + '}'; - } - return str; - break; - - default: - return 'UNKNOWN'; - break; - } -} - - - var java_enabled = (beef.browser.hasJava())? "Yes" : "No"; - var vbscript_enabled = (beef.browser.hasVBScript())? "Yes" : "No"; - var has_flash = (beef.browser.hasFlash())? "Yes" : "No"; - var has_googlegears = (beef.browser.hasGoogleGears())? "Yes" : "No"; - - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'java_enabled='+java_enabled+'&vbscript_enabled='+vbscript_enabled+'&has_flash='+has_flash+'&has_googlegears='+has_googlegears); -}); diff --git a/modules/browser/detect_scripts_support/config.yaml b/modules/browser/detect_scripts_support/config.yaml deleted file mode 100644 index daefc57db..000000000 --- a/modules/browser/detect_scripts_support/config.yaml +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright 2011 Wade Alcorn wade@bindshell.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -beef: - module: - detect_scripts_support: - enable: true - category: "Browser" - name: "Scripts Support" - description: "This module will retrieve the selected hooked browser scripting engines." - authors: ["wade", "vo", "passbe", "saafan"] - target: - working: ["ALL"] diff --git a/modules/browser/detect_scripts_support/module.rb b/modules/browser/detect_scripts_support/module.rb deleted file mode 100644 index 9a8e85905..000000000 --- a/modules/browser/detect_scripts_support/module.rb +++ /dev/null @@ -1,29 +0,0 @@ -# -# Copyright 2011 Wade Alcorn wade@bindshell.net -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -class Detect_scripts_support < BeEF::Core::Command - - def callback - content = {} - content['Java enabled'] = @datastore['java_enabled'] - content['VBscript enabled'] = @datastore['vbscript_enabled'] - content['Has Flash'] = @datastore['has_flash'] - content['Has Google Gears'] = @datastore['has_googlegears'] - - save content - #update_zombie! - end - -end