Attacking Common Applications: Attacking WordPress

Hello Everyone.
In the Attacking WordPress module, at the last question:

Following the steps in this section, obtain code execution on the host and submit the contents of the flag.txt file in the webroot.

I tried to use Metasploit as instructed in the module, but every time I run it I get the following error:

I know the Metasploit isn’t necessary to obtain the flag, but still… I would like to know how to solve the problem.

Thank you!