'If the url is : "http://www.foobar.com/asd.txt" this method returns:
- http://www.foobar.com/foobar.zip
- http://www.foobar.com/foobar.rar
- http://www.foobar.com/www.foobar.zip
- http://www.foobar.com/www.foobar.rar
- etc...
:param url: A URL to transform.
:return: A list of URL\'s that mutate the original url passed
as parameter.
>>> from w3af.core.data.parsers.doc.url import URL
>>> u = url_fuzzer()
>>> url = URL(\'http://www.w3af.com/\')
>>> mutants = list(u._mutate_domain_name(url))
>>> URL(\'http://www.w3af.com/www.tar.gz\') in mutants
True
>>> URL(\'http://www.w3af.com/www.w3af.tar.gz\') in mutants
True
>>> URL(\'http://www.w3af.com/www.w3af.com.tar.gz\') in mutants
True
>>> len(mutants) > 20
True'

def _mutate_domain_name(self, url):

    domain = url.get_domain()
    domain_path = url.get_domain_path()
    splitted_domain = domain.split('.')
    for i in xrange(len(splitted_domain)):
        filename = '.'.join(splitted_domain[0:(i + 1)])
        for extension in self._backup_exts:
            filename_ext = ((filename + '.') + extension)
            domain_path_copy = domain_path.copy()
            domain_path_copy.set_file_name(filename_ext)
            (yield domain_path_copy)
