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 missing payload tests #16398

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

jmartin-tech
Copy link
Contributor

@jmartin-tech jmartin-tech commented Apr 1, 2022

A number of recent payload adds do not conform the patterns
used for suggesting spec configurations. Manually added these
tests to remove warning in rspec run.

Verification

List the steps needed to make sure this thing works

  • bundle exec rspec spec/modules/payloads_spec.rb
  • Verify the following warning is not printed
Some payloads are untested.  See log/untested-payload.log for details.

A number of recent payload adds do not conform the patterns
used for suggesting spec configurations.  Manually added these
tests to remove warning in rspec run.
@jmartin-tech
Copy link
Contributor Author

@msjenkins-r7 test this please.

@gwillcox-r7 gwillcox-r7 self-assigned this Apr 6, 2022
@gwillcox-r7
Copy link
Contributor

Seems this is working as expected:

 ~/git/metasploit-framework │ land-pr16398:pr/16398 ?21  bundle exec rspec spec/modules/payloads_spec.rb
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 42124
modules/payloads .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

Top 10 slowest examples (4.97 seconds, 12.6% of total time):
  modules/payloads cmd/unix/pingback_reverse it should behave like payload cached size is consistent cmd/unix/pingback_reverse has a valid cached_size
    1.77 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176
  modules/payloads windows/dllinject/bind_named_pipe it should behave like payload cached size is consistent windows/dllinject/bind_named_pipe can be instantiated
    0.65296 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:153
  modules/payloads windows/meterpreter/bind_named_pipe it should behave like payload cached size is consistent windows/meterpreter/bind_named_pipe has a valid cached_size
    0.42135 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176
  modules/payloads windows/x64/vncinject/bind_tcp_rc4 it should behave like payload cached size is consistent windows/x64/vncinject/bind_tcp_rc4 has a valid cached_size
    0.41331 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176
  modules/payloads windows/x64/meterpreter/reverse_winhttp it should behave like payload cached size is consistent windows/x64/meterpreter/reverse_winhttp has a valid cached_size
    0.3357 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176
  modules/payloads cmd/unix/reverse_ssh it should behave like payload cached size is consistent cmd/unix/reverse_ssh is dynamic_size?
    0.3285 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:165
  modules/payloads osx/x64/meterpreter_reverse_https it should behave like payload cached size is consistent osx/x64/meterpreter_reverse_https has a valid cached_size
    0.29412 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176
  modules/payloads windows/x64/vncinject/reverse_tcp it should behave like payload cached size is consistent windows/x64/vncinject/reverse_tcp has a valid cached_size
    0.26879 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176
  modules/payloads windows/x64/vncinject/reverse_tcp_rc4 it should behave like payload cached size is consistent windows/x64/vncinject/reverse_tcp_rc4 has a valid cached_size
    0.24185 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176
  modules/payloads windows/x64/meterpreter/reverse_tcp it should behave like payload cached size is consistent windows/x64/meterpreter/reverse_tcp has a valid cached_size
    0.23661 seconds ./spec/support/shared/examples/payload_cached_size_is_consistent.rb:176

Finished in 39.43 seconds (files took 4.97 seconds to load)
1901 examples, 0 failures

Randomized with seed 42124
Coverage report generated for RSpec to /home/gwillcox/git/metasploit-framework/coverage. 10432 / 27720 LOC (37.63%) covered.
 ~/git/metasploit-framework │ land-pr16398:pr/16398 ?21

@gwillcox-r7 gwillcox-r7 added rn-fix release notes fix bug labels Apr 7, 2022
@gwillcox-r7 gwillcox-r7 merged commit 80d3163 into rapid7:master Apr 7, 2022
@gwillcox-r7
Copy link
Contributor

Release Notes

A number of recent payload adds did not conform the patterns used for suggesting spec configurations. Tests for these payloads have now been manually added to ensure they will be appropriately tested as part of rspec checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants