def exploit_all(self): """Exploit all vulns with all plugins.""" ea = ExploitAllDialog(self.w3af) resp = ea.run() if resp != gtk.RESPONSE_OK: return effectively_exploit_all(self.w3af, ea.enabled_plugins, ea.stopOnFirst) return
def _exploit_vuln(self, widg, event): """Exploits row's vulnerability""" try: # This method returns None if there is no path at the position. path, tv_column, x_cell, _ = self.get_path_at_pos(int(event.x), int(event.y)) except TypeError: """ >>> a,b,c = None Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'NoneType' object is not iterable """ return False else: # Make the X coord relative to the cell x_cell -= self.get_cell_area(path, tv_column).x if 0 <= x_cell <= 18: # Get the potential vuln object vuln = self.get_instance(path) # https://github.com/andresriancho/w3af/issues/181 # FIXME: for some reason, in some edge case, the get_instance # returns a dict instead of a vuln object which then # triggers a bug, so we have a workaround for it: if not hasattr(vuln, 'get_id'): return False if vuln is not None and self._is_exploitable(vuln.get_id()): exploits = self._get_exploits(vuln.get_id()) # Move to Exploit Tab self.w3af.mainwin.nb.set_current_page(3) # Exec the exploits for this vuln effectively_exploit_all(self.w3af, exploits, False) return True return False
def _exploit_all(self, widget, pname, stoponfirst): """Exploit all the vulns.""" effectively_exploit_all(self.w3af, [pname], stoponfirst)