Resource file

As explained in the documentation of Metasploit (https://metasploit.help.rapid7.com/docs/resource-scripts), resource scripts provide an easy way for you to automate repetitive tasks in Metasploit. Conceptually, they're just like batch scripts. They contain a set of commands that are automatically and sequentially executed when you load the script in Metasploit. You can create a resource script by chaining together a series of Metasploit console commands and by directly embedding Ruby to do things such as call APIs, interact with objects in the database, and iterate actions.

Let's check out the .rc file generated by MSFPC in the preceding command:

The payload is set to windows/shell/reverse_tcp when the CMD option is used.

Get Hands-On Red Team Tactics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.