使用 help 命令探索核心命令
在这一步,你将启动 Metasploit Console 并使用 help 命令来探索可用的命令。当你不确定某个命令的作用或有哪些可用命令时,help 命令是你最有价值的资源。
首先,让我们启动 Metasploit Console。我们将使用 -q (quiet,安静) 标志来跳过启动横幅(banner),以获得更简洁的界面。
在你的终端中执行以下命令:
msfconsole -q
你会注意到命令提示符(prompt)变为了 msf >,这表明你现在已进入 Metasploit Console 内部。
现在,让我们使用 help 命令来查看所有可用命令的列表。
help
你将看到一个很长的命令列表,它们被分类以便于导航。
Core Commands
=============
Command Description
------- -----------
? Help menu
banner Display an awesome metasploit banner
cd Change the current working directory
color Toggle color output
connect Communicate with a host
...
Module Commands
===============
Command Description
------- -----------
advanced Displays advanced options for a module
back Move back from the current context
info Displays information about a module
...
你也可以获取特定命令的详细帮助。例如,要了解更多关于 search 命令的信息,你可以输入 help search。
help search
这将显示 search 命令的语法和选项。
Usage: search [options] <keywords>
Search for modules, plugins, and other framework objects.
OPTIONS:
-h, --help Help banner.
-o <file>, --output <file> Send output to a file in csv format.
-S <string>, --search <string> Search string for row filtering.
-t <type>, --type <type> The type of module to search for (exploit, payload, auxiliary, etc)
...
在进入下一步之前,请随意使用 help 探索其他命令。