To use the script demonstrated in this recipe, you will need to have access to a system that is running a vulnerable service that can be identified using an NSE script and exploited with Metasploit. In the example provided, a Windows XP system running an SMB service that is vulnerable to the MS08-067 NetAPI exploit is used. For more information on setting up a Windows system, refer to the Installing Windows Server recipe in Chapter 1, Getting Started. Additionally, this section will require a script to be written to the filesystem by using a text editor such as Vim or GNU nano. For more information on writing scripts, refer to the Using text editors (Vim and GNU nano) recipe in Chapter 1, Getting Started.