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

Fix error downloading a file from generic shell #18372

Merged
merged 1 commit into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/msf/base/sessions/command_shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ def vprint_status(s)
end

def _file_transfer
raise NotImplementedError.new('Session does not support file transfers.') if @session_type.ends_with?(':winpty')
raise NotImplementedError.new('Session does not support file transfers.') if session_type.ends_with?(':winpty')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To the tester, we should verify if we need to add in something slightly different here, potentially akin to:

    raise NotImplementedError.new('Session does not support file transfers.') if @session.session_type.ends_with?(':winpty')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To the tester, we should verify if we need to add in something slightly different here, potentially akin to:

    raise NotImplementedError.new('Session does not support file transfers.') if @session.session_type.ends_with?(':winpty')

I've tried with your suggested code but it doesn't work, it comes back to the previous error


FileTransfer.new(self)
end
Expand Down