Exemple #1
0
def effectively_exploit_all(w3af, enabled_plugins, stopOnFirst):
    """Exploit all the vulnerabilities.

    Just like in the 1-to-1 exploit, I'll create two generators that will
    perform the work in a "threaded" way.

    :param w3af: the core
    :param enabled_plugins: Which plugins are to be used.
    :param stopOnFirst: if the exploit should stop in the first exploited vuln.
    """
    dlg = TextDialogConsumer("Multiple Exploit!")

    # Start the generator that launches the exploit
    exploit_task = _launch_exploit_all(dlg, w3af, enabled_plugins, stopOnFirst)
    gobject.idle_add(exploit_task.next)
Exemple #2
0
    def _execute_exploit(self, expl, vuln):
        """Exploits a vulnerability.

        This raises a text dialog that informs how the exploit
        is going until it finishes.

        This method is going to:
            a) Create the TextDialog
            b) spawn a thread to launch the exploit process
            c) spawn a thread to read from the output manager queue

        b and c both write messages to the TextDialog.

        :param expl: the exploit to use
        :param vuln: the vulnerability to exploit
        """
        dlg = TextDialogConsumer("Exploit!")
        
        # Start the generator that launches the exploit
        exploit_task = self._launch_exploit(dlg, expl, vuln)
        gobject.idle_add(exploit_task.next)

        return