From b45a36180e589336f6528d1df4e619d04bace5be Mon Sep 17 00:00:00 2001 From: James Lee Date: Tue, 22 Nov 2016 09:29:04 -0600 Subject: [PATCH] Don't complain when Proxies is an empty string --- lib/msf/core/handler/reverse.rb | 2 +- lib/msf/core/handler/reverse_tcp_double_ssl.rb | 2 +- lib/msf/core/handler/reverse_tcp_ssl.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msf/core/handler/reverse.rb b/lib/msf/core/handler/reverse.rb index 0e886a6d5b..7d9b496c55 100644 --- a/lib/msf/core/handler/reverse.rb +++ b/lib/msf/core/handler/reverse.rb @@ -61,7 +61,7 @@ module Msf # if it fails to start the listener. # def setup_handler - if datastore['Proxies'] and not datastore['ReverseAllowProxy'] + if !datastore['Proxies'].blank? && !datastore['ReverseAllowProxy'] raise RuntimeError, "TCP connect-back payloads cannot be used with Proxies. Use 'set ReverseAllowProxy true' to override this behaviour." end diff --git a/lib/msf/core/handler/reverse_tcp_double_ssl.rb b/lib/msf/core/handler/reverse_tcp_double_ssl.rb index 621d3116d3..3a7daa0e1b 100644 --- a/lib/msf/core/handler/reverse_tcp_double_ssl.rb +++ b/lib/msf/core/handler/reverse_tcp_double_ssl.rb @@ -63,7 +63,7 @@ module ReverseTcpDoubleSSL # if it fails to start the listener. # def setup_handler - if datastore['Proxies'] and not datastore['ReverseAllowProxy'] + if !datastore['Proxies'].blank? && !datastore['ReverseAllowProxy'] raise RuntimeError, 'TCP connect-back payloads cannot be used with Proxies. Can be overriden by setting ReverseAllowProxy to true' end diff --git a/lib/msf/core/handler/reverse_tcp_ssl.rb b/lib/msf/core/handler/reverse_tcp_ssl.rb index eb5597e065..ae1ae39d49 100644 --- a/lib/msf/core/handler/reverse_tcp_ssl.rb +++ b/lib/msf/core/handler/reverse_tcp_ssl.rb @@ -43,7 +43,7 @@ module ReverseTcpSsl # if it fails to start the listener. # def setup_handler - if datastore['Proxies'] and not datastore['ReverseAllowProxy'] + if !datastore['Proxies'].blank? && !datastore['ReverseAllowProxy'] raise RuntimeError, "TCP connect-back payloads cannot be used with Proxies. Use 'set ReverseAllowProxy true' to override this behaviour." end