diff --git a/modules/browser/detect_details/command.js b/modules/browser/detect_details/command.js deleted file mode 100644 index 43e73de92..000000000 --- a/modules/browser/detect_details/command.js +++ /dev/null @@ -1,82 +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 data = beef.browser.type(); - - // A function that will get trigered during the conversion to JSON that will remove - // elements with "false" value. - function replacer(key, value) { - if (value == true) - return value; - else if (typeof value == 'object') // Allow the array itself to be iterated. - return value; - else // (value == false) - return; // Do not return anything, to exclude the element from being added. - } - - beef.net.send('<%= @command_url %>', <%= @command_id %>, JSON.stringify(data,replacer)); -}); diff --git a/modules/browser/detect_details/config.yaml b/modules/browser/detect_details/config.yaml deleted file mode 100644 index 9e62be93f..000000000 --- a/modules/browser/detect_details/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_details: - enable: true - category: "Browser" - name: "Browser Type" - description: "This module will retrieve the selected hooked browser details." - authors: ["wade", "vo", "passbe", "saafan"] - target: - working: ['ALL'] diff --git a/modules/browser/detect_details/module.rb b/modules/browser/detect_details/module.rb deleted file mode 100644 index 1a1483cd6..000000000 --- a/modules/browser/detect_details/module.rb +++ /dev/null @@ -1,26 +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_details < BeEF::Core::Command - - def callback - content = {} - content['Browser type'] = @datastore['browser_type'] - - save content - #update_zombie! - end - -end