def process(self, fuzzresult): base_url = fuzzresult.url try: dom = xml.dom.minidom.parseString(fuzzresult.history.fr_content()) except: raise FuzzException(FuzzException.FATAL, 'Error while parsing {0!s}.'.format(fuzzresult.url)) urlList = dom.getElementsByTagName("loc") for url in urlList: u = url.childNodes[0].data if not self.blacklisted_extension(u) and url_same_domain(u, fuzzresult.url): self.queue_url(u)
def process(self, fuzzresult): l = [] #<a href="www.owasp.org/index.php/OWASP_EU_Summit_2008">O #ParseResult(scheme='', netloc='', path='www.owasp.org/index.php/OWASP_EU_Summit_2008', params='', query='', fragment='') for r in self.regex: for i in r.findall(fuzzresult.history.fr_content()): schema, host, path, params, variables, f = urlparse(i) if (not schema or schema == "http" or schema == "https") and \ (url_same_domain(i, fuzzresult.url) or (not host and path)): if i not in l: l.append(i) # dir path split_path = path.split("/") newpath = '/'.join(split_path[:-1]) + "/" self.queue_url(urljoin(fuzzresult.url, newpath)) # file path u = urljoin(fuzzresult.url, i) if not self.blacklisted_extension(u): self.queue_url(u)