Пример #1
0
    def process_result():
        # Disable communicator until we start another job
        Comunicator.disable()

        # Check if process exited cleanly
        if Cracker.crt_process is not None:
            Cracker.crt_process.check_clean_exit()
        show_stdout = list(
            filter(
                None,
                SingleProcess(Cracker.attack_command +
                              " --show").split_stdout()))
        password = ""

        # Check if we cracked something!
        if len(show_stdout) != 0:
            for line in show_stdout:
                cracked_obj = Configuration.hashcat_show_regex.match(line)
                die(
                    cracked_obj is None,
                    "REGEX error! could not match the --show line:%s" %
                    show_stdout)
                password = cracked_obj.group(1)

        msg = "[FAIL] Password for '%s' is not contained in rule '%s'" %\
              (Cracker.mac_ssid_job, Cracker.crt_rule["name"])
        if len(password) > 7:
            msg = "[SUCCESS] The password for '%s' is '%s'" % (
                Cracker.mac_ssid_job, password)

        Comunicator.printer(msg)
        Cracker.safe_send_result(password)

        Cracker.clean_variables()
Пример #2
0
    def process_result():
        # Disable communicator until we start another job
        Comunicator.disable()

        # Check if process exited cleanly
        Cracker.crt_process.check_clean_exit()
        show_stdout = list(
            filter(
                None,
                SingleProcess(Cracker.attack_command +
                              " --show").split_stdout()))
        password = ""

        # Check if we cracked something!
        if len(show_stdout) != 0:
            for line in show_stdout:
                cracked_obj = Configuration.hashcat_show_regex.match(line)
                die(
                    cracked_obj is None,
                    "REGEX error! could not match the --show line:%s" %
                    show_stdout)
                password = cracked_obj.group(1)

        Cracker.safe_send_result(password)

        Cracker.clean_variables()