Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit c36725e

Browse files
committed
Change search function to use new module_list methods
1 parent 1a10fa2 commit c36725e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/cli/modules.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,8 @@ def search_modules(args)
4545
module_list = Wpxf::Auxiliary.module_list + Wpxf::Exploit.module_list
4646

4747
results = []
48-
module_list.select { |m| m =~ pattern }.each do |path|
49-
context = Context.new
50-
context.load_module(path)
51-
results.push(path: path, title: context.module.module_name)
48+
module_list.select { |m| m[:name] =~ pattern }.each do |mod|
49+
results.push(path: mod[:name], title: mod[:class].new.module_name)
5250
end
5351

5452
results

0 commit comments

Comments
 (0)