Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed procmon bug from refactor #94

Open
wants to merge 1 commit into
base: sulley_refactor
Choose a base branch
from

Conversation

jtpereyda
Copy link
Contributor

Fixed bug introduced by refactor. Sulley would indicate that a target failed to restart, even when it didn't.

Session.restart_target is used (by poll_pedrpc) as if it returns True or False. It actually returned None or False.

In master, sulley/sessions.py line 705 revision 54bdbbe

            if self.restart_target(target, stop_first=False) == False:
                self.logger.critical("Restarting the target failed, exiting.")
                ...

In sulley_refactor, sulley/sessions.py line 673 revision 256c21d

            if not self.restart_target(target, stop_first=False):
                self.logger.critical("Restarting the target failed, exiting.")
                ...

The problem is that restart_target never returned True if it succeeded. It returned None. This worked before, since None == False is False. But not None is True. I updated restart_target to return True if it succeeds.

>>> None == False
False
>>> not None
True

…poll_pedrpc) as if it returns True or False. It actually returned None or False, counterintuitively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant