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

Session logging bugfix and small improvement #8601

Merged
merged 2 commits into from Jun 23, 2017

Conversation

dirkjanm
Copy link
Contributor

@dirkjanm dirkjanm commented Jun 23, 2017

This fixes #8597 by only stripping newline characters from the string instead of stripping the last character no matter what (which cuts short user commands).

It also adds the session name (usually the number) to the file, to prevent multiple sessions to the same IP writing to the same file and making things confusing.

Verification

  • Start msfconsole
  • Enable session logging setg SessionLogging true
  • Spawn a meterpreter
  • The session log file is created, and the commands in there do not get cut off
  • The filename contains the session ID
  • Spawn a second meterpreter on the same host
  • A second session file gets generated, instead of output from both sessions being written to the same file

@dirkjanm dirkjanm changed the title Session logging bugfix and small improvment Session logging bugfix and small improvement Jun 23, 2017
@busterb busterb self-assigned this Jun 23, 2017
@busterb
Copy link
Member

busterb commented Jun 23, 2017

Looks great, thanks @dirkjanm

@busterb busterb merged commit 03b3675 into rapid7:master Jun 23, 2017
@busterb
Copy link
Member

busterb commented Jun 23, 2017

Release Notes

This fix resolves a bug in session logging that caused the final character of a line to be removed from the log. It also adds the session name (usually the number) to the file, which prevents multiple sessions to the same IP from writing to the same file.

@dirkjanm dirkjanm deleted the session_logging branch June 24, 2017 12:55
@alrosenthal-r7 alrosenthal-r7 added the rn-fix release notes fix label Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
payload rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Session logging cuts commands short
3 participants