Skip to content

Commit

Permalink
Work around lack of option normalization during size calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
HD Moore committed Mar 14, 2015
1 parent 03019cf commit 0d12ca4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/msf/core/payload/windows/reverse_winhttps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def initialize(*args)
super
register_advanced_options(
[
OptBool.new('StagerVerifySSLCert', [true, 'Whether to verify the SSL certificate hash in the handler', false])
OptBool.new('StagerVerifySSLCert', [false, 'Whether to verify the SSL certificate hash in the handler', false])
], self.class)
end

Expand All @@ -52,7 +52,7 @@ def generate
verify_cert = false
verify_cert_hash = nil

if datastore['StagerVerifySSLCert']
if datastore['StagerVerifySSLCert'].to_s =~ /^(t|y|1)/i
unless datastore['HandlerSSLCert']
raise ArgumentError, "StagerVerifySSLCert is enabled but no HandlerSSLCert is configured"
else
Expand All @@ -69,7 +69,7 @@ def generate
# Generate the simple version of this stager if we don't have enough space
if self.available_space.nil? || required_space > self.available_space

if datastore['StagerVerifySSLCert']
if datastore['StagerVerifySSLCert'].to_s =~ /^(t|y|1)/i
raise ArgumentError, "StagerVerifySSLCert is enabled but not enough payload space is available"
end

Expand Down

0 comments on commit 0d12ca4

Please sign in to comment.