Land #9865, Update Meterpreter `ls`/`dir` help

4.x
Adam Cammack 2018-04-11 17:05:18 -05:00 committed by Metasploit
parent e43686177a
commit c3ecbb723d
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
1 changed files with 16 additions and 15 deletions

View File

@ -28,26 +28,27 @@ class Console::CommandDispatcher::Stdapi::Fs
# Options for the download command. # Options for the download command.
# #
@@download_opts = Rex::Parser::Arguments.new( @@download_opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help banner." ], "-h" => [ false, "Help banner" ],
"-c" => [ false, "Resume getting a partially-downloaded file." ], "-c" => [ false, "Resume getting a partially-downloaded file" ],
"-a" => [ false, "Enable adaptive download buffer size." ], "-a" => [ false, "Enable adaptive download buffer size" ],
"-b" => [ true, "Set the initial block size for the download." ], "-b" => [ true, "Set the initial block size for the download" ],
"-l" => [ true, "Set the limit of retries (0 unlimits)." ], "-l" => [ true, "Set the limit of retries (0 unlimits)" ],
"-r" => [ false, "Download recursively." ], "-r" => [ false, "Download recursively" ],
"-t" => [ false, "Timestamp downloaded files." ]) "-t" => [ false, "Timestamp downloaded files" ])
# #
# Options for the upload command. # Options for the upload command.
# #
@@upload_opts = Rex::Parser::Arguments.new( @@upload_opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help banner." ], "-h" => [ false, "Help banner" ],
"-r" => [ false, "Upload recursively." ]) "-r" => [ false, "Upload recursively" ])
# #
# Options for the ls command # Options for the ls command
# #
@@ls_opts = Rex::Parser::Arguments.new( @@ls_opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help banner." ], "-h" => [ false, "Help banner" ],
"-S" => [ true, "Search string." ], "-S" => [ true, "Search string on filename (as regular expression)" ],
"-t" => [ false, "Sort by time" ], "-t" => [ false, "Sort by time" ],
"-s" => [ false, "Sort by size" ], "-s" => [ false, "Sort by size" ],
"-r" => [ false, "Reverse sort order" ], "-r" => [ false, "Reverse sort order" ],
@ -59,8 +60,8 @@ class Console::CommandDispatcher::Stdapi::Fs
# Options for the lls command # Options for the lls command
# #
@@lls_opts = Rex::Parser::Arguments.new( @@lls_opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help banner." ], "-h" => [ false, "Help banner" ],
"-S" => [ true, "Search string." ], "-S" => [ true, "Search string on filename (as regular expression)" ],
"-t" => [ false, "Sort by time" ], "-t" => [ false, "Sort by time" ],
"-s" => [ false, "Sort by size" ], "-s" => [ false, "Sort by size" ],
"-r" => [ false, "Reverse sort order" ]) "-r" => [ false, "Reverse sort order" ])
@ -140,7 +141,7 @@ class Console::CommandDispatcher::Stdapi::Fs
files = [] files = []
opts = Rex::Parser::Arguments.new( opts = Rex::Parser::Arguments.new(
"-h" => [ false, "Help Banner." ], "-h" => [ false, "Help Banner" ],
"-d" => [ true, "The directory/drive to begin searching from. Leave empty to search all drives. (Default: #{root})" ], "-d" => [ true, "The directory/drive to begin searching from. Leave empty to search all drives. (Default: #{root})" ],
"-f" => [ true, "A file pattern glob to search for. (e.g. *secret*.doc?)" ], "-f" => [ true, "A file pattern glob to search for. (e.g. *secret*.doc?)" ],
"-r" => [ true, "Recursivly search sub directories. (Default: #{recurse})" ] "-r" => [ true, "Recursivly search sub directories. (Default: #{recurse})" ]
@ -550,7 +551,7 @@ class Console::CommandDispatcher::Stdapi::Fs
def cmd_ls_help def cmd_ls_help
print_line "Usage: ls [options]" print_line "Usage: ls [options] [glob/path]"
print_line print_line
print_line "Lists contents of directory or file info, searchable" print_line "Lists contents of directory or file info, searchable"
print_line @@ls_opts.usage print_line @@ls_opts.usage