You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/msf/core/handler/reverse_http.rb
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,8 @@ def initialize(info = {})
153
153
OptInt.new('SessionExpirationTimeout',[false,'The number of seconds before this session should be forcibly shut down',(24*3600*7)]),
154
154
OptInt.new('SessionCommunicationTimeout',[false,'The number of seconds of no activity before this session should be killed',300]),
155
155
OptString.new('MeterpreterUserAgent',[false,'The user-agent that the payload should use for communication','Mozilla/4.0 (compatible; MSIE 6.1; Windows NT)']),
156
-
OptString.new('MeterpreterServerName',[false,'The server header that the handler will send in response to requests','Apache'])
156
+
OptString.new('MeterpreterServerName',[false,'The server header that the handler will send in response to requests','Apache']),
157
+
OptAddress.new('ReverseListenerBindAddress',[false,'The specific IP address to bind to on the local system'])
157
158
],Msf::Handler::ReverseHttp)
158
159
end
159
160
@@ -176,10 +177,17 @@ def setup_handler
176
177
comm=nil
177
178
end
178
179
180
+
# Determine where to bind the HTTP(S) server to
181
+
bindaddrs=ipv6 ? '::' : '0.0.0.0'
182
+
183
+
if not datastore['ReverseListenerBindAddress'].to_s.empty?
184
+
bindaddrs=datastore['ReverseListenerBindAddress']
185
+
end
186
+
179
187
# Start the HTTPS server service on this host/port
0 commit comments