Skip to content

Commit

Permalink
Update lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/…
Browse files Browse the repository at this point in the history
…fs.rb


Sets the path variable via a loop so that it fixes the path assignment and lets the user give a series of directories

Co-authored-by: Brendan <[email protected]>
  • Loading branch information
e-lliot and bwatters-r7 authored Oct 10, 2023
1 parent 6b00d87 commit ccb3927
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,12 +401,15 @@ def cmd_lmkdir(*args)
return true
end

begin
::FileUtils.mkdir_p(path)
print_line("Directory '#{args[0]}' created successfully.")
rescue => e
print_error("Error creating directory: #{e}")
end
args.each { |path|
begin
::FileUtils.mkdir_p(path)
print_line("Directory '#{path}' created successfully.")
rescue => e
print_error("Error creating #{path} directory: #{e}")
end
}


return true
end
Expand Down

0 comments on commit ccb3927

Please sign in to comment.