Commit Graph

269 Commits

Author SHA1 Message Date
Christophe De La Fuente 4ccab4543d Register VulnAttempts for both Exploit and Auxiliary modules 2025-05-28 18:19:12 +02:00
adfoster-r7 10e8cbb48c Merge pull request #19953 from dwelch-r7/rails-7.1-upgrade
Rails 7.1 upgrade
2025-04-11 15:48:25 +01:00
adfoster-r7 07b731b82e Skip loading external modules with unsupported runtimes 2025-04-09 23:42:12 +01:00
Dean Welch 0954f5507e Rails 7.1 upgrade 2025-04-08 12:47:31 +01:00
adfoster-r7 8e9c144e2c Consolidate datastore with fallbacks logic 2025-02-09 20:26:52 +00:00
adfoster-r7 fcee7a5972 Rollback origin support for vulns 2025-01-27 12:44:58 +00:00
adfoster-r7 c768ec8c83 Update report_vuln to support tracking origin 2025-01-20 22:07:13 +00:00
cgranleese-r7 2edbc6a134 Land #19546, Improve database module cache performance 2024-12-13 15:31:08 +00:00
adfoster-r7 d7c8836f3b Fix crash when importing Metasploit xml file 2024-10-22 23:47:44 +01:00
adfoster-r7 93e0ca7cd5 Improve database module cache performance 2024-10-10 10:52:19 +01:00
sjanusz-r7 cf97b36d98 Align importing timestamps method with msf_ prefix 2024-06-03 11:09:59 +01:00
sjanusz-r7 f7b69e2fe7 Fix service 'updated at' time not being updated correctly 2024-06-03 10:17:19 +01:00
Dean Welch 25a65c0ed7 Consolidate and simplify session tests 2024-04-05 13:10:15 +01:00
Dean Welch f132bdbe30 Enforce single module stance 2024-03-25 11:53:23 +00:00
adfoster-r7 298e03b1cd Land #18885, update the sessions command to be consistent 2024-03-20 18:49:33 +00:00
Gaurav Jain 02713fcadb Update tests for sessions command 2024-03-15 01:26:18 +05:30
Gaurav Jain 1eea790759 Update spec tests for Msf::Ui::Console::CommandDispatcher::Session.rb
- Fixes spec test for sessions command where session id should be
  sent as a string and not as an integer
2024-02-25 17:35:53 +05:30
Dean Welch 559ab0f10d Add tests for optional session mixins 2024-02-23 17:12:25 +00:00
Dean Welch f9fb803af7 fix misnamed shared example and missing mssql mocks 2024-02-12 12:30:49 +00:00
Dean Welch 792708c07b Remove all references to Msf::SymbolicModule 2024-02-07 15:08:47 +00:00
Dean Welch 56f6020ff5 Assert that the caches modification time is in fact a time 2024-01-24 12:10:22 +00:00
Dean Welch 057facea90 Remove invalid modification time test 2024-01-24 11:43:04 +00:00
Dean Welch cd8cc75cf3 Add smb session type 2023-12-04 17:55:11 +00:00
Dean Welch ea41ec7a5d Fix tests leaving behind threads 2023-11-07 17:43:43 +00:00
adfoster-r7 a97cc128f7 Fix flakey test failure 2023-10-25 14:09:34 +01:00
Dean Welch 8527eea15d Add lazy loading for payloads 2023-06-16 12:04:48 +00:00
Jeffrey Martin efd49f07b0 update migration calls in spec
As of Rails 7.0.5 the `migrations_paths` are called once in spec run
2023-06-13 17:15:19 -05:00
Jeffrey Martin 047a1eba07 Rails 6.1 upgrade 2021-08-09 12:16:08 -05:00
A Galway 134e820322 removes obsolete has_host? usage 2021-06-01 12:02:58 +01:00
cgranleese-r7 98349a6823 Improve handling of external modules when missing runtime dependencies 2021-02-02 14:49:16 +00:00
dwelch-r7 2eb5208ae0 Rename shared example files to remove warnings 2021-01-19 12:32:58 +00:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Jeffrey Martin d99db6ac0e refactor test for ruby 2.7 deprecations
addresses `warning: deprecated Object#=~ is called on Array; it always returns nil`
2020-11-20 10:59:04 -06:00
Adam Galway 14b233f957 fixes broken tests 2020-09-16 15:20:16 +01:00
Jeffrey Martin 9a64e3cd38 Land #13913, [GSoC] Specs for the SQLi library 2020-08-20 17:43:11 -05:00
Alan Foster baa33df45d Always use module cache for searching 2020-08-14 19:14:54 +01:00
Niboucha Redouane e4b77616fa Minor formatting (rubocop -a) 2020-08-08 03:49:29 +02:00
Niboucha Redouane 1f17b07746 use Timecop, separate query_proc from sqli_obj, and address other issues in the specs 2020-08-08 03:30:12 +02:00
Jeffrey Martin 8a86cad4a0 remove commented lines not needed 2020-07-31 11:56:52 -05:00
Jeffrey Martin 0b65266ac1 adjust migration to proxy call to ActiveRecord
By adding proxy method the call to ActiveRecord::Migrator.migrations_paths
is decoupled from the migration task allowing more flexibility for the
underlying migration set selection to change in future Rails versions.
2020-07-31 11:56:51 -05:00
Jeffrey Martin 2c92d17ed9 refactor migration process for Rails 5
As noted in https://github.com/rails/rails/issues/36544 using
ActiveRecord migrations internally is not truly supported. This
workaround is valid for Rails 5 and might be easily adjusted
in Rails 6 although that is still TBD.
2020-07-31 11:56:51 -05:00
Jeffrey Martin 41776f093c adjust xml spec to use FactoryBot for workspace 2020-07-31 11:56:51 -05:00
Jeffrey Martin 5d1c4dafa1 begin adjust migrations and remove old test
removed connection tests are from rails 3 expectations
2020-07-31 11:56:50 -05:00
Jeffrey Martin 07cbe426e2 Rails 5, all models inherit from ApplicationRecord
ApplicationRecord is a new superclass for all app models, analogous to app controllers subclassing ApplicationController instead of ActionController::Base. This gives apps a single spot to configure app-wide model behavior.
https://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html#active-record-models-now-inherit-from-applicationrecord-by-default

Deprecated Relation#uniq use Relation#distinct instead.
https://edgeguides.rubyonrails.org/5_0_release_notes.html#active-record-deprecations
2020-07-31 11:56:49 -05:00
Niboucha Redouane f48ed5027f test #call_function, and not methods that might be implemented on specific DBMS only 2020-07-27 16:38:07 +02:00
Niboucha Redouane 89fef9f9fe Refactor and fix some specs, avoid sleeping in time-based shared examples 2020-07-27 03:15:16 +02:00
Niboucha Redouane 854df7e93b Add shared examples for SQLi::Common, and some tests for MySQLi 2020-07-23 18:54:20 +02:00
Alan Foster 2509bbfbc3 Remove rspec test focus, and ensure all tests run 2020-07-07 17:29:50 +01:00
Matthew Kienow 4e11dcfee1 Fix import issue caused by missing wspace key
Modify import module to follow pattern used in other Msf::DBManager
import modules. Test module updated for method name changes.
2019-07-01 15:58:36 -04:00
Jacob Robles bf6a62fba8 Add workspace arg to spec 2019-06-05 08:47:13 -05:00