From d5b020f9be735f422a726b444b0a88027fdcfcc2 Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Sun, 6 Aug 2017 22:08:04 +0000 Subject: [PATCH] Add evasion to build_missing_beefjs_components method --- core/main/handlers/modules/beefjs.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/main/handlers/modules/beefjs.rb b/core/main/handlers/modules/beefjs.rb index e9de903a1..8983df383 100644 --- a/core/main/handlers/modules/beefjs.rb +++ b/core/main/handlers/modules/beefjs.rb @@ -163,7 +163,13 @@ module BeEF component_path = beefjs_components[k] # @note we output the component to the hooked browser - @body << File.read(component_path)+"\n\n" + config = BeEF::Core::Configuration.instance + if config.get("beef.extension.evasion.enable") + evasion = BeEF::Extension::Evasion::Evasion.instance + @body << evasion.obfuscate(File.read(component_path) + "\n\n") + else + @body << File.read(component_path) + "\n\n" + end # @note finally we add the component to the list of components already generated so it does not get generated numerous times. if @beef_js_cmps.eql? ''