mirror of
https://github.com/rapid7/metasploit-framework
synced 2024-11-05 14:57:30 +01:00
Adds JSObfu.disabled for spec stubbing, fixes BES specs.
This commit is contained in:
parent
df999db547
commit
8e1b00ce95
@ -5,7 +5,7 @@ PATH
|
||||
actionpack (< 4.0.0)
|
||||
activesupport (>= 3.0.0, < 4.0.0)
|
||||
bcrypt
|
||||
jsobfu (~> 0.1.6)
|
||||
jsobfu (~> 0.1.7)
|
||||
json
|
||||
metasploit-model (~> 0.26.1)
|
||||
meterpreter_bins (= 0.0.7)
|
||||
@ -90,7 +90,7 @@ GEM
|
||||
hike (1.2.3)
|
||||
i18n (0.6.11)
|
||||
journey (1.0.4)
|
||||
jsobfu (0.1.6)
|
||||
jsobfu (0.1.7)
|
||||
rkelly-remix (= 0.0.6)
|
||||
json (1.8.1)
|
||||
mail (2.5.4)
|
||||
|
@ -10,6 +10,7 @@ module Exploitation
|
||||
# from the gem available under the Rex namespace.
|
||||
#
|
||||
class JSObfu < ::JSObfu
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -56,7 +56,7 @@ Gem::Specification.new do |spec|
|
||||
# Needed for some admin modules (cfme_manageiq_evm_pass_reset.rb)
|
||||
spec.add_runtime_dependency 'bcrypt'
|
||||
# Needed for Javascript obfuscation
|
||||
spec.add_runtime_dependency 'jsobfu', '~> 0.1.6'
|
||||
spec.add_runtime_dependency 'jsobfu', '~> 0.1.7'
|
||||
# Needed for some admin modules (scrutinizer_add_user.rb)
|
||||
spec.add_runtime_dependency 'json'
|
||||
# Things that would normally be part of the database model, but which
|
||||
|
@ -240,6 +240,9 @@ describe Msf::Exploit::Remote::BrowserExploitServer do
|
||||
end
|
||||
|
||||
context 'when a new visitor requests the exploit' do
|
||||
before { JSObfu.disabled = true }
|
||||
after { JSObfu.disabled = false }
|
||||
|
||||
it 'calls send_response once' do
|
||||
server.should_receive(:send_response).once
|
||||
server.on_request_uri(cli, request)
|
||||
@ -278,6 +281,9 @@ describe Msf::Exploit::Remote::BrowserExploitServer do
|
||||
let(:tag) { 'joe' }
|
||||
let(:cookie) { "#{cookie_name}=#{tag}" }
|
||||
|
||||
before { JSObfu.disabled = true }
|
||||
after { JSObfu.disabled = false }
|
||||
|
||||
it 'calls send_response once' do
|
||||
server.should_receive(:send_response).once
|
||||
server.on_request_uri(cli, request)
|
||||
|
Loading…
Reference in New Issue
Block a user