Path: blob/master/lib/rex/post/session_compatible_modules.rb
19720 views
# -*- coding: binary -*-12module Rex3module Post4###5#6# This module provides a list of modules that are compatible with the current session7#8###9module SessionCompatibleModules1011# @return [Array<String>]12def session_compatible_modules13# Use the built in search command functionality to get a list of search results14search_params = { 'session_type' => [[self.session.type], []] }15Msf::Modules::Metadata::Cache.instance.find(search_params)16end1718# @return [String]19def format_session_compatible_modules20<<~EOF21This session also works with the following modules:2223#{session_compatible_modules.flat_map(&:fullname).join("\n ")}2425EOF26end27end28end29end303132