Variables in Metasploit
For most exploits that we use within the Metasploit Framework, we need to set values to some of the variables. The following are some of the common and most important variables in the Metasploit Framework:
Now that we have seen different variables, let's have a look at some of the common commands used for assigning variable values.
- The
getcommand: Thegetcommand is used to retrieve the value contained in a particular local variable within the Metasploit Framework. For example, you might want to view the IP address of the target system that you have set for a particular exploit.
Its syntax is msf>get.
The following screenshot shows the use of the msf> get command:
Figure 3.19 – Metasploit Framework 'get' command
- The
getgcommand: Thegetgcommand is very similar to thegetcommand, except it returns the value contained in the global variable.
...