Recon-ng / modules / recon / hosts / enum / http / web /

import framework
# unique to module
import re

class Module(framework.module):

    def __init__(self, params):
        framework.module.__init__(self, params)
        self.register_option('host', self.goptions['domain']['value'], 'yes', 'fully qualified target hostname') = {
                     'Name': 'Gender Analyzer Lookup',
                     'Author': 'Brendan Coles (bcoles[at]',
                     'Description': 'Attempts to guess the author\'s gender using',
                     'Comments': []
    def module_run(self):
        host  = self.options['host']['value']

        # request the author's gender
        url = '' % (host)
        self.verbose('URL: %s' % url)
        resp = self.request(url)

        # extract and present results
        content = resp.text
        result ='<strong>(written by a [a-z]+<\/strong> \(\d+%\))', content)
        if result:
            gender     ="written by a ([a-z]+)",
            confidence ="\((\d+%)\)",
            self.output(' believes the author of %s is a %s (%s).' % (host, gender, confidence))
            self.output(' was unable to determine the gender of the author.')