MCPcopy Create free account
hub / github.com/AutoRecon/AutoRecon / SMTPUserEnum

Class SMTPUserEnum

autorecon/default-plugins/smtp-user-enum.py:3–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1from autorecon.plugins import ServiceScan
2
3class SMTPUserEnum(ServiceScan):
4
5 def __init__(self):
6 super().__init__()
7 self.name = 'SMTP-User-Enum'
8 self.tags = ['default', 'safe', 'smtp', 'email']
9
10 def configure(self):
11 self.match_service_name('^smtp')
12
13 async def run(self, service):
14 await service.execute('hydra smtp-enum://{addressv6}:{port}/vrfy -L "' + self.get_global('username_wordlist', default='/usr/share/seclists/Usernames/top-usernames-shortlist.txt') + '" 2>&1', outfile='{protocol}_{port}_smtp_user-enum_hydra_vrfy.txt')
15 await service.execute('hydra smtp-enum://{addressv6}:{port}/expn -L "' + self.get_global('username_wordlist', default='/usr/share/seclists/Usernames/top-usernames-shortlist.txt') + '" 2>&1', outfile='{protocol}_{port}_smtp_user-enum_hydra_expn.txt')
16
17 def manual(self, service, plugin_was_run):
18 service.add_manual_command('Try User Enumeration using "RCPT TO". Replace <TARGET-DOMAIN> with the target\'s domain name:&#x27;, [
19 'hydra smtp-enum://{addressv6}:{port}/rcpt -L "' + self.get_global('username_wordlist', default='/usr/share/seclists/Usernames/top-usernames-shortlist.txt') + '" -o "{scandir}/{protocol}_{port}_smtp_user-enum_hydra_rcpt.txt" -p <TARGET-DOMAIN>'
20 ])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected