Пример #1
0
    def od_wrapper(*args, **kwds):
        from w3af.core.controllers.output_manager import manager

        with OutputManager.start_lock:
            if not manager.is_alive():
                try:
                    manager.start()
                except RuntimeError:
                    # is_alive() doesn't always return the true state of the
                    # thread, thus we need to add this try/except, see:
                    #
                    # https://github.com/andresriancho/w3af/issues/7453
                    pass
        return func(*args, **kwds)
Пример #2
0
    def od_wrapper(*args, **kwds):
        from w3af.core.controllers.output_manager import manager

        if manager.is_alive():
            return func(*args, **kwds)

        with OutputManager.start_lock:
            try:
                manager.start()
            except RuntimeError:
                # is_alive() might say that the process is NOT alive when:
                #   * We just created the OutputManager instance
                #   * The instance was created, started and joined
                #
                # In the second case, we can't start() it again and thus we'll
                # get a RuntimeError
                #
                # https://github.com/andresriancho/w3af/issues/7453
                # https://github.com/andresriancho/w3af/issues/5354
                pass

        return func(*args, **kwds)
Пример #3
0
    def od_wrapper(*args, **kwds):
        from w3af.core.controllers.output_manager import manager

        if manager.is_alive():
            return func(*args, **kwds)

        with OutputManager.start_lock:
            try:
                manager.start()
            except RuntimeError:
                # is_alive() might say that the process is NOT alive when:
                #   * We just created the OutputManager instance
                #   * The instance was created, started and joined
                #
                # In the second case, we can't start() it again and thus we'll
                # get a RuntimeError
                #
                # https://github.com/andresriancho/w3af/issues/7453
                # https://github.com/andresriancho/w3af/issues/5354
                pass

        return func(*args, **kwds)