Skip to content

Commit a270cc6

Browse files
committed
adds category to msf/core/module.rb
1 parent a8e7dc8 commit a270cc6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

lib/msf/core/module.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def shortname
4141
refname.split('/').last
4242
end
4343

44+
def category
45+
refname.split('/')[1]
46+
end
47+
4448
#
4549
# Returns this module's ranking.
4650
#
@@ -270,6 +274,16 @@ def refname
270274
self.class.refname
271275
end
272276

277+
#
278+
# Returns the module's category, defined as the part of the refname after
279+
# the platform
280+
#
281+
# "shell" when windows/shell/reverse_tcp, "local" when windows/local/bypassuac
282+
def category
283+
self.class.category
284+
end
285+
alias_method :category, :catname
286+
273287
#
274288
# Returns the module's rank.
275289
#

0 commit comments

Comments
 (0)