Skip to content

Wrap hash argument in curly braces - #21710

Closed
cdelafuente-r7 wants to merge 1 commit into
rapid7:masterfrom
cdelafuente-r7:fix/braceless-argument-error
Closed

Wrap hash argument in curly braces#21710
cdelafuente-r7 wants to merge 1 commit into
rapid7:masterfrom
cdelafuente-r7:fix/braceless-argument-error

Conversation

@cdelafuente-r7

@cdelafuente-r7 cdelafuente-r7 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

This fixes #21690

This fixes an issue with keyword arguments for run_simple, exploit_simple and check_simple (see the original issue for details)

Breaking Changes

None

Verification Steps

Open a plain shell session and run sessions -u <id>. Confirm the Meterpreter upgrade completes without any ArgumentError error.

Test Evidence

Before

msf payload(cmd/windows/powershell/shell_reverse_tcp) > sessions -u 1
[*] Executing 'post/multi/manage/shell_to_meterpreter' on session: [1]
[*] Upgrading session ID: 1
[*] Starting exploit/multi/handler
[-] Post failed: ArgumentError wrong number of arguments (given 0, expected 1)
[-] Call stack:
[-]   /home/msfuser//metasploit-framework/lib/msf/base/simple/exploit.rb:174:in `exploit_simple'
[-]   /home/msfuser//metasploit-framework/modules/post/multi/manage/shell_to_meterpreter.rb:428:in `create_multihandler'
[-]   /home/msfuser//metasploit-framework/modules/post/multi/manage/shell_to_meterpreter.rb:193:in `run'

After

msf payload(cmd/windows/powershell/shell_reverse_tcp) > sessions -u 1
[*] Executing 'post/multi/manage/shell_to_meterpreter' on session: [1]
[*] Upgrading session ID: 1
[*] Starting exploit/multi/handler
[*] Started reverse TCP handler on 192.168.5.12:4433
[*] Sending stage (248902 bytes) to 192.168.5.89
[*] Meterpreter session 2 opened (192.168.5.12:4433 -> 192.168.5.89:50138) at 2026-07-24 18:13:54 +0200
[*] Stopping exploit/multi/handler

Environment

Field Details
Operating System macOS
Target Software/Hardware Windows 10
Docker Image / Vagrant Setup n/a

AI Usage Disclosure

Copilot was used to mass refactor.

Pre-Submission Checklist

  • Included a corresponding documentation markdown file in documentation/modules (new modules only)
  • No sensitive information (IP addresses, credentials, API keys, hashes) in code or documentation
  • Tested on the target environment specified in the Environment section above
  • Included RSpec tests for library changes (encouraged for lib/ changes)
  • Read the CONTRIBUTING.md and module acceptance guidelines
Hardware and Complex Software Module Guidance

If your module targets specialized hardware (routers, IoT, PLCs, etc.) or complex software (licensed, multi-service, or multi-version), provide a pcap, screen recording, or video showing successful execution.

Email sanitized pcaps/recordings to msfdev@metasploit.com — remove real IPs, credentials, and hostnames before sending. If hardware/software is unavailable, explain in the PR description.

Responsiveness and PR Takeover Policy

We want every contribution to make it into the project. If approximately 2 weeks pass after a review request without a comment or code update from you, the team may take over the PR and complete the work on your behalf.

If this happens, you will remain credited as a co-author on the final commit — your contribution is always recognized.

This policy exists to keep the project moving forward. It is not a reflection on the quality of your work or your involvement. Life happens, and we would rather finish the work together than let a good contribution go stale.

@github-actions

Copy link
Copy Markdown

Thanks for your pull request! As part of our landing process, we manually verify that all modules work as expected.

We've added the additional-testing-required label to indicate that additional testing is required before this pull request can be merged.
For maintainers, this means visiting here.

@cdelafuente-r7

Copy link
Copy Markdown
Contributor Author

Closing this PR since another solution has been implemented. We want to favor backward compatibility.

@github-project-automation github-project-automation Bot moved this from Todo to Done in Metasploit Kanban Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Regression (#21653): run_simple/exploit_simple braceless-hash callers raise ArgumentError, breaking sessions -u and ~10 modules

1 participant