Commit Graph

75 Commits

Author SHA1 Message Date
Alex b643c62eb6 Appeasing the RuboCop gods: added docs, fixed warnings, made it happy. 2025-07-10 13:18:40 +02:00
Martin Sutovsky 8e16a50363 Adds reloading for stagers/stages/adapters 2025-07-10 11:09:10 +02:00
Martin Sutovsky b9e8c9d111 Removes debug stuff 2025-07-03 11:09:36 +02:00
Martin Sutovsky 9445bb3885 Fixing payload reloading 2025-07-03 11:07:30 +02:00
Alex 8bf1c40f95 Update reloading.rb 2025-07-03 10:55:01 +02:00
Alex e11277f2f5 Update reloading.rb 2025-07-03 08:12:54 +02:00
Alex 9470a8b407 Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 10:46:16 +02:00
Alex d77d0537a4 Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:39:26 +02:00
Alex 743478b79e Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:38:52 +02:00
Alex efc6152664 Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:38:41 +02:00
Alex 74de17fcab Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:38:34 +02:00
Alex f2b3e00f01 Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:37:41 +02:00
Alex e657aee397 Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:37:35 +02:00
Alex 18ec6af5af Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:37:27 +02:00
Alex 232f1b4597 Update lib/msf/core/module_manager/reloading.rb
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
2025-07-01 08:37:21 +02:00
Alex 8034930ce1 Fix payload module reloading functionality 2025-06-29 12:00:58 +02:00
adfoster-r7 07b731b82e Skip loading external modules with unsupported runtimes 2025-04-09 23:42:12 +01:00
Dean Welch 792708c07b Remove all references to Msf::SymbolicModule 2024-02-07 15:08:47 +00:00
Dean Welch 7c448ceb50 Force reload_all to load any unloaded modules 2024-01-03 15:49:37 +00:00
Dean Welch d60993f7e8 Enable using modules when deferred loading is turned on 2023-10-06 16:04:34 +01:00
Dean Welch 8527eea15d Add lazy loading for payloads 2023-06-16 12:04:48 +00:00
Alan Foster c8cc111318 Rename class.parents to class.module_parents 2021-08-09 12:16:13 -05:00
Jeffrey Martin 047a1eba07 Rails 6.1 upgrade 2021-08-09 12:16:08 -05:00
cgranleese-r7 98349a6823 Improve handling of external modules when missing runtime dependencies 2021-02-02 14:49:16 +00:00
dwelch-r7 1617b3ec9b Use zeitwerk for lib/msf/core folder 2020-12-07 10:31:45 +00:00
Adam Cammack bcccfd86b8 Teach module cache about realname
Also uses the class refname where appropriate since an instances refname
reflects the alias currently in use and if a module is reloaded while
using an alias the old behavior would generate spurious cache entries
that would not be cleaned up or modified. Specifically, this could
register a self-referential alias that would cause a stack overflow when
trying to `use` such an alias.

Additionally, some other `fullname`s were changed to `realname`s for
clarity.
2019-08-26 13:26:48 -05:00
Adam Cammack cf59022936 Add aliases to modules
This allows modules that can be addressed by name to register possible
aliases for themselves by defining an `Aliases` constant in the top
level of the module.
2019-06-03 13:40:27 -05:00
Wei Chen f176dd03b5 Add a new module type to support evasion (WIP) 2018-08-02 11:54:38 -05:00
Brent Cook 86c927edb7 fix msfvenom referencing a nil typed_module_set 2018-01-18 00:16:42 -06:00
Brent Cook 7fe237abe1 Land #9220, Module cache improvements 2018-01-17 22:34:51 -06:00
christopher lee 238aecf81c Integrated first round of feedback 2017-11-20 10:45:39 -06:00
christopher lee 621130d74b Added missing requires 2017-11-17 13:06:05 -06:00
christopher lee fe1af35107 First pass at changes needed for module metadata caching 2017-11-15 16:38:01 -06:00
Adam Cammack 62aac450f8 Change confusing variable name 2017-09-22 11:43:26 -05:00
Adam Cammack 2d8001aa62 Sum the results of the module loaders
Fixes #8229
2017-04-11 23:21:58 -05:00
Adam Cammack 1306065c91 Always run both loaders
How did I miss this? How did this work before??? I have a bad feeling
this may break pro.
2017-03-31 10:42:13 -05:00
Adam Cammack 71df231918 Add new loader for arbitrary executables
Still some kluges left in the shim and we have to hit the disk when
constructing the module path
2017-03-28 10:27:12 -05:00
Christian Mehlmauer 8f4752d11e show load warnings to the user 2016-01-22 23:38:45 +01:00
Christian Mehlmauer 51eb79adc7 first try in changing class names 2016-01-22 23:36:37 +01:00
Brent Cook 66b453edd6 ensure the database cache is always updated, present accurate reporting on search 2015-09-22 12:56:26 -05:00
HD Moore de8205a42e Fix the defaults for module_info_by_path_from_database! 2015-09-01 17:48:56 -05:00
HD Moore 148a5ba78e A better solution for the spec coverage 2015-09-01 13:45:46 -05:00
HD Moore 31087ff33e Refresh after cache rebuild should use the active module paths 2015-09-01 13:39:15 -05:00
HD Moore 5addf899b2 Refactor, same intent as before, just faster and correct. 2015-09-01 13:15:44 -05:00
HD Moore d84caeca72 Ignore cached modules outside of load path, only load cache once on startup 2015-09-01 12:31:05 -05:00
Luke Imhoff b863978028 Remove fastlib
MSP-11368
MSP-11143

Remove fastlib as it slows down the code loading process.  From the
previous commit, the mean loading for
`METASPLOIT_FRAMEWORK_PROFILE=true msfconsole -q -x exit` was
27.9530±0.3485 seconds (N=10).  The mean after removal of fastlib
was 17.9820±0.6497 seconds (N=10).  This means an average 35.67%
reduction in boot time.
2014-09-18 15:24:21 -05:00
HD Moore 5e123e024d Add 'coding: binary' to all msf/rex library files
This fixes a huge number of hard-to-detect runtime bugs
that occur when a default utf-8 string from one of these
libraries is passed into a method expecting ascii-8bit
2014-08-17 17:31:53 -05:00
Tab Assassin 7e5e0f7fc8 Retab lib 2013-08-30 16:28:33 -05:00
sinn3r 56367ef69c Update documentation 2013-07-24 19:04:47 -05:00
sinn3r ed51d284fa Change name, change how data is passed, fix rspec 2013-07-24 17:15:56 -05:00