'GET latest.zip and latest.tar.gz and compare with the hashes from the
release.db that was previously generated from wordpress.org [0]
and contains all release hashes.
This gives the initial wordpress version, not the current one.
[0] http://wordpress.org/download/release-archive/'

def _fingerprint_installer(self, domain_path, wp_unique_url, response):

    zip_url = domain_path.url_join('latest.zip')
    tar_gz_url = domain_path.url_join('latest.tar.gz')
    install_urls = [zip_url, tar_gz_url]
    for install_url in install_urls:
        response = self._uri_opener.GET(install_url, cache=True, respect_size_limit=False)
        m = hashlib.md5()
        m.update(response.get_body())
        remote_release_hash = m.hexdigest()
        release_db = self._release_db
        for line in file(release_db):
            try:
                line = line.strip()
                (release_db_hash, release_db_name) = line.split(',')
            except:
                continue
            if (release_db_hash == remote_release_hash):
                desc = 'The    sysadmin    used    WordPress    version    "%s"    during    the    installation,    which    was    found    by    matching    the    contents    of    "%s"    with    the    hashes    of    known    releases.    If    the    sysadmin    did    not    update    wordpress,    the    current    version    will    still    be    the    same.'
                desc = (desc % (release_db_name, install_url))
                i = Info('Fingerprinted    Wordpress    version', desc, response.id, self.get_name())
                i.set_url(install_url)
                kb.kb.append(self, 'info', i)
                om.out.information(i.get_desc())
