vailixi Posted January 11, 2016 Share Posted January 11, 2016 I wanted to write a GUI for msfvenom. I'm doing the GUI with Qt since I've used it before and it makes pretty interfaces. I was going to use a lot of dropdown menus and comboboxes to select options. I wanted to get a list of payloads to populate the combobox by looping through the results of a query like "search windows" or something like that. msfvenom --list almost does what I want except it wants to show the description. What is the easiest way to get a list of modules? Pretty much I just want to get the modules by type. I think somewhere in would be the code I need to edit but since I don't know a lick of ruby. opt.on('-l', '--list [type]', Array, 'List a module type. Options are: payloads, encoders, nops, all') do |l| if l.nil? or l.empty?l = ["all"]endopts[:list] = lend def dump_payloads init_framework(:module_types => [ ::Msf::MODULE_PAYLOAD ]) tbl = Rex::Ui::Text::Table.new( 'Indent' => 4, 'Header' => "Framework Payloads (#{framework.stats.num_payloads} total)", 'Columns' => [ "Name", "Description" ]) framework.payloads.each_module { |name, mod| tbl << [ name, mod.new.description.split.join(' ') ] } "\n" + tbl.to_s + "\n" end Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.