Add new template for DoS modules
parent
dd57138423
commit
2fdc34c8fd
|
@ -11,6 +11,8 @@ class Msf::Modules::External::Shim
|
|||
remote_exploit_cmd_stager(mod)
|
||||
when 'capture_server'
|
||||
capture_server(mod)
|
||||
when 'dos'
|
||||
dos(mod)
|
||||
else
|
||||
# TODO have a nice load error show up in the logs
|
||||
''
|
||||
|
@ -66,4 +68,12 @@ class Msf::Modules::External::Shim
|
|||
meta = mod_meta_common(mod)
|
||||
render_template('capture_server.erb', meta)
|
||||
end
|
||||
|
||||
def self.dos(mod)
|
||||
meta = mod_meta_common(mod)
|
||||
meta[:date] = mod.meta['date'].dump
|
||||
meta[:references] = mod.meta['references'].map do |r|
|
||||
"[#{r['type'].upcase.dump}, #{r['ref'].dump}]"
|
||||
render_template('dos.erb', meta)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
require 'msf/core/modules/external/bridge'
|
||||
require 'msf/core/module/external'
|
||||
|
||||
class MetasploitModule < Msf::Auxiliary
|
||||
include Msf::Module::External
|
||||
include Msf::Auxiliary::Dos
|
||||
|
||||
def initialize
|
||||
super({
|
||||
<%= common_metadata meta %>
|
||||
'References' =>
|
||||
[
|
||||
<%= meta[:references] %>
|
||||
],
|
||||
'DisclosureDate' => <%= meta[:date] %>,
|
||||
})
|
||||
|
||||
register_options([
|
||||
<%= meta[:options] %>
|
||||
])
|
||||
end
|
||||
|
||||
def run
|
||||
print_status("Starting server...")
|
||||
mod = Msf::Modules::External::Bridge.open(<%= meta[:path] %>)
|
||||
mod.run(datastore)
|
||||
wait_status(mod)
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue