Skip to content

Commit c3113f7

Browse files
Incorporating a few more cleanup items from jvazquez
1 parent cbfef6e commit c3113f7

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

modules/auxiliary/admin/smb/psexec_command.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def initialize(info = {})
5555
OptString.new('FILEPREFIX', [false, 'Add a custom prefix to the temporary files','']),
5656
OptInt.new('DELAY', [true, 'Wait this many seconds before reading output and cleaning up', 0]),
5757
OptInt.new('RETRY', [true, 'Retry this many times to check if the process is complete', 0]),
58-
OptPath.new('LOGDIR', [false, 'File to log output', nil]),
5958
], self.class)
6059

6160
deregister_options('RHOST')
@@ -126,9 +125,6 @@ def get_output(file)
126125
return
127126
end
128127

129-
log_dir = ::File.join(Msf::Config.log_directory,'scripts', 'psexec_command')
130-
::FileUtils.mkdir_p(log_dir)
131-
132128
# Report output
133129
print_good("#{peer} - Command completed successfuly!")
134130
if datastore['VERBOSE']
@@ -137,7 +133,8 @@ def get_output(file)
137133
end
138134

139135
report_note(
140-
:host => datastore['RHOSTS'],
136+
:rhost => datastore['RHOSTS'],
137+
:rport => datastore['RPORT'],
141138
:type => "psexec_command",
142139
:name => datastore['COMMAND'],
143140
:data => output

0 commit comments

Comments
 (0)