Metasploit offers automation through resource scripts. The resource scripts eliminate the task of setting the options manually by setting up everything automatically, thus saving the time that is required to set up the options of a module and the payload.
There are two ways to create a resource script: either by which are creating the script manually, or using the makerc command. I recommend the makerc command over manual scripting, since it eliminates typing errors. The makerc command saves all the previously issued commands in a file, which can be used with the resource command. Let's see an example:
We can ...