rapid7/metasploit-framework — pull request #174 by jhartftw (2012-02-12 19:28:44+00:00)
Title: Post module to loot creds from .fetchmailrc

It is somewhat nasty to parse, but if present this will get you a good set of credentials.

For example, if ~/.fetchmailrc contains:

```
defaults user jhart proto pop3
poll server1 proto imap user "user1" password "password1"
poll server2 pass pass2
# skip me
poll server3 proto imap
user user3-1 password "password3-1"
user user3-2 password password3-2
poll server4 proto imaps port 12345 pass pass4 via cats4
poll server5 proto pops user user5 pass pass5 esmtpname smtpuser esmtppassword smtppassword
poll server6 proto pop3 user user6 pass pass6 esmtpname smtpuser esmtppassword smtppassword smtphost relay
```

This will get you:

```
.fetchmailrc credentials
========================

Username Password Server Protocol Port
-------- -------- ------ -------- ----
jhart pass4 cats4 imaps 12345
jhart pass2 server2 pop3
smtpuser smtppassword localhost esmtp
smtpuser smtppassword relay esmtp
user1 password1 server1 imap
user3-1 password3-1 server3 imap
user3-2 password3-2 server3 imap
user5 pass5 server5 pops
user6 pass6 server6 pop3
```