Skip to content

Commit cb92d41

Browse files
committed
Land rapid7#6508, add dir alias for ls
2 parents 51efb2d + 3acb5d2 commit cb92d41

File tree

1 file changed

+8
-0
lines changed
  • lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi

1 file changed

+8
-0
lines changed

lib/rex/post/meterpreter/ui/console/command_dispatcher/stdapi/fs.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def commands
5252
'cat' => 'Read the contents of a file to the screen',
5353
'cd' => 'Change directory',
5454
'del' => 'Delete the specified file',
55+
'dir' => 'List files (alias for ls)',
5556
'download' => 'Download a file or directory',
5657
'edit' => 'Edit a file',
5758
'getlwd' => 'Print local working directory',
@@ -73,6 +74,7 @@ def commands
7374
'cat' => [],
7475
'cd' => ['stdapi_fs_chdir'],
7576
'del' => ['stdapi_fs_rm'],
77+
'dir' => ['stdapi_fs_stat', 'stdapi_fs_ls'],
7678
'download' => [],
7779
'edit' => [],
7880
'getlwd' => [],
@@ -598,6 +600,12 @@ def cmd_ls(*args)
598600
return true
599601
end
600602

603+
#
604+
# Alias the ls command to dir, for those of us who have windows muscle-memory
605+
#
606+
alias cmd_dir cmd_ls
607+
608+
601609
#
602610
# Make one or more directory.
603611
#

0 commit comments

Comments
 (0)