Explanation of Metasploit Module Shell

This shell has some common sections that are included in most MSF modules. The first is require msf/core. This require statement enables the module to use the MSF core library. Next is a class declaration. Since we are attacking an FTP server remotely, we need the module to inherit the attributes of Msf::Exploit::Remote. If you were developing a local privilege escalation or some other type of exploit, you would change this line to that specific exploit type. Another line specific to our FTP module is Exploit::Remote::Ftp, which enables the use of FTP methods. This line abstracts some of the commands, such as initializing a connection and logging in, so we can focus on writing the exploit rather than establishing ...

Get Wicked Cool Ruby Scripts 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.