File tree Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Expand file tree Collapse file tree 2 files changed +23
-5
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ def self.dump_exploit_module(mod, indent = '')
165
165
output << " Name: #{ mod . name } \n "
166
166
output << " Module: #{ mod . fullname } \n "
167
167
output << " Platform: #{ mod . platform_to_s } \n "
168
+ output << " Arch: #{ mod . arch_to_s } \n "
168
169
output << " Privileged: " + ( mod . privileged? ? "Yes" : "No" ) + "\n "
169
170
output << " License: #{ mod . license } \n "
170
171
output << " Rank: #{ mod . rank_to_s . capitalize } \n "
@@ -275,11 +276,20 @@ def self.dump_post_module(mod, indent = '')
275
276
276
277
# Authors
277
278
output << "Provided by:\n "
278
- mod . each_author { |author |
279
+ mod . each_author . each do |author |
279
280
output << indent + author . to_s + "\n "
280
- }
281
+ end
281
282
output << "\n "
282
283
284
+ # Compatible session types
285
+ if mod . session_types
286
+ output << "Compatible session types:\n "
287
+ mod . session_types . sort . each do |type |
288
+ output << indent + type . capitalize + "\n "
289
+ end
290
+ output << "\n "
291
+ end
292
+
283
293
# Actions
284
294
if mod . action
285
295
output << "Available actions:\n "
Original file line number Diff line number Diff line change @@ -20,7 +20,8 @@ def initialize(info={})
20
20
] , Msf ::Post )
21
21
22
22
# Default stance is active
23
- self . passive = ( info [ 'Passive' ] and info [ 'Passive' ] == true ) || false
23
+ self . passive = info [ 'Passive' ] || false
24
+ self . session_types = info [ 'SessionTypes' ] || [ ]
24
25
end
25
26
26
27
#
@@ -161,8 +162,8 @@ def session_compatible?(sess_or_sid)
161
162
return false if s . nil?
162
163
163
164
# Can't be compatible if it's the wrong type
164
- if self . module_info [ "SessionTypes" ]
165
- return false unless self . module_info [ "SessionTypes" ] . include? ( s . type )
165
+ if session_types
166
+ return false unless session_types . include? ( s . type )
166
167
end
167
168
168
169
# Types are okay, now check the platform.
@@ -189,9 +190,16 @@ def session_compatible?(sess_or_sid)
189
190
# @see passive?
190
191
attr_reader :passive
191
192
193
+ #
194
+ # A list of compatible session types
195
+ #
196
+ # @return [Array]
197
+ attr_reader :session_types
198
+
192
199
protected
193
200
194
201
attr_writer :passive
202
+ attr_writer :session_types
195
203
196
204
def session_changed?
197
205
@ds_session ||= datastore [ "SESSION" ]
You can’t perform that action at this time.
0 commit comments