File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
modules/auxiliary/admin/smb Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ def psexec(smbshare, command)
246
246
vprint_status ( "Removing the service..." )
247
247
stubdata =
248
248
svc_handle +
249
- NDR . wstring ( "C: \\ WINDOWS \\ Temp\\ msfcommandoutput.txt" )
249
+ NDR . wstring ( "%WINDIR% \\ Temp\\ msfcommandoutput.txt" )
250
250
begin
251
251
response = dcerpc . call ( 0x02 , stubdata )
252
252
if ( dcerpc . last_response != nil and dcerpc . last_response . stub_data != nil )
@@ -268,10 +268,10 @@ def psexec(smbshare, command)
268
268
#This is not really useful but will prevent double \\ on the wire :)
269
269
if datastore [ 'SHARE' ] =~ /.[\\ \/ ]/
270
270
simple . connect ( smbshare )
271
- simple . delete ( "C: \\ WINDOWS \\ Temp\\ msfcommandoutput.txt" )
271
+ simple . delete ( "%WINDIR% \\ Temp\\ msfcommandoutput.txt" )
272
272
else
273
273
simple . connect ( smbshare )
274
- simple . delete ( "C: \\ WINDOWS \\ Temp\\ msfcommandoutput.txt" )
274
+ simple . delete ( "%WINDIR% \\ Temp\\ msfcommandoutput.txt" )
275
275
end
276
276
277
277
rescue ::Interrupt
You can’t perform that action at this time.
0 commit comments