As with the MSFConsole interface, a CLI provides extensive coverage of various modules that can be launched at any one instance. However, it lacks some of the advanced automation features of MSFConsole.
To access msfcli, use the Terminal to execute the following command:
# msfcli -x
This will display all of the available modes similar to that of MSFConsole, as well as usage instructions for selecting the particular module and setting its parameters. Note that all of the variables or parameters should follow the convention of param=value and that all options are case-sensitive. We have presented a small exercise to select and execute a particular exploit:
# msfcli windows/smb/ms08_067_netapi O [*] Please wait while we load the module tree... Name Current Setting Required Description ---- --------------- -------- ----------- ...