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

Add tests for Msf::Exploit::Local exploit_type and sysinfo methods #18682

Merged

Conversation

adfoster-r7
Copy link
Contributor

Continuation of #18667

Add tests for Msf::Exploit::Local module types to ensure that sysinfo will not break again in the future

Verification

  • Ensure CI passes
  • Ensure the tests fail if the sysinfo method is removed:
Randomized with seed 30258
Msf::Exploit::Local FFF.

  1) Msf::Exploit::Local#sysinfo when the session is Meterpreter returns the sysinfo object
     Failure/Error: expect(subject.sysinfo).to eq({ 'Computer' => 'FooComputer' })
     
     NoMethodError:
       undefined method `sysinfo' for #<Msf::Exploit::Local:0x00007f96ce25d200 @module_info_copy={"Compat"=>{"Meterpreter"=>{"Commands"=>["stdapi_sys_config_sysinfo", "stdapi_sys_config_getenv", "stdapi_sys_process_execute"]}, "Encoder"=>{}, "Nop"=>{}, "Payload"=>{"ConnectionType"

@adfoster-r7
Copy link
Contributor Author

@msjenkins-r7 retest this please

1 similar comment
@adfoster-r7
Copy link
Contributor Author

@msjenkins-r7 retest this please

@cgranleese-r7 cgranleese-r7 self-assigned this Jan 12, 2024
@cgranleese-r7 cgranleese-r7 added enhancement rn-enhancement release notes enhancement labels Jan 12, 2024
@cgranleese-r7 cgranleese-r7 merged commit 63e1b49 into rapid7:master Jan 12, 2024
36 checks passed
@cgranleese-r7
Copy link
Contributor

Release Notes

Add tests for Msf::Exploit::Local module types to ensure that sysinfo will not break again in the future.

Sh3llSp4wn added a commit to Sh3llSp4wn/metasploit-framework that referenced this pull request Jan 15, 2024
…type and sysinfo methods"

This reverts commit 63e1b49, reversing
changes made to c0e02bd.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants