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

Make external module read loop more robust #9224

Merged
merged 1 commit into from Nov 20, 2017

Conversation

acammack-r7
Copy link
Contributor

Changes from a "hope we get at most one message at a time" model to
something beginning to resemble a state machine. Also logs error output
and fails the MSF module when the external module fails.

Verification

  • Your favorite external module (either haraka or capture_test.py should still work.
  • Anything logged to stderr from the external module should show up in ~/.msf4/logs/framework.log

Changes from a "hope we get at most one message at a time" model to
something beginning to resemble a state machine. Also logs error output
and fails the MSF module when the external module fails.
@mkienow-r7
Copy link
Contributor

Verified using capture_test.py. Note, the first execution after removing the time.sleep(5) statement I observed one of the expected output statements missing. I was unable to reproduce this issue on subsequent tests.

msf > use auxiliary/server/capture/capture_test
msf auxiliary(capture_test) > run
[*] Auxiliary module running as background job 0.

[*] Starting server...
msf auxiliary(capture_test) > [*] TEST
[*] TEST
[*] TEST
[*] TEST

msf auxiliary(capture_test) >
msf auxiliary(capture_test) >
msf auxiliary(capture_test) >
msf auxiliary(capture_test) > run
[*] Auxiliary module running as background job 1.

[*] Starting server...
msf auxiliary(capture_test) > [*] TEST
[*] TEST
[*] TEST
[*] TEST
[*] TEST

@mkienow-r7 mkienow-r7 merged commit dd57138 into rapid7:master Nov 20, 2017
mkienow-r7 added a commit that referenced this pull request Nov 20, 2017
@mkienow-r7 mkienow-r7 self-assigned this Nov 20, 2017
@acammack-r7 acammack-r7 added the external modules PRs dealing with modules run as their own process label Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug external modules PRs dealing with modules run as their own process library rn-no-release-notes no release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants