basic module display info
git-svn-id: file:///home/svn/incoming/trunk@2714 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
9fe92b5347
commit
f0e18799ba
|
@ -22,7 +22,9 @@ class ReadableText
|
|||
when MODULE_PAYLOAD
|
||||
return dump_payload_module(mod, indent)
|
||||
when MODULE_NOP
|
||||
return dump_nop_module(mod, indent)
|
||||
return dump_basic_module(mod, indent)
|
||||
when MODULE_ENCODER
|
||||
return dump_basic_module(mod, indent)
|
||||
when MODULE_EXPLOIT
|
||||
return dump_exploit_module(mod, indent)
|
||||
else
|
||||
|
@ -77,14 +79,14 @@ class ReadableText
|
|||
end
|
||||
|
||||
#
|
||||
# Dumps information about a nop module.
|
||||
# Dumps information about a module, just the basics.
|
||||
#
|
||||
def self.dump_nop_module(mod, indent)
|
||||
def self.dump_basic_module(mod, indent)
|
||||
# General
|
||||
output = "\n"
|
||||
output += " Name: #{mod.name}\n"
|
||||
output += " Version: #{mod.version}\n"
|
||||
#output += " Platform: #{mod.platform_to_s}\n"
|
||||
output += " Platform: #{mod.platform_to_s}\n"
|
||||
output += " Arch: #{mod.arch.to_s}\n"
|
||||
output += "\n"
|
||||
|
||||
|
|
|
@ -57,9 +57,11 @@ class Payload
|
|||
|
||||
# Prepend a comment
|
||||
if (fmt != 'raw' and opts['NoComment'] != true)
|
||||
((ds = payload.datastore.to_s) and ds.length > 0) ? ds += "\n" : ds = ''
|
||||
|
||||
buf = Buffer.comment(
|
||||
"#{payload.refname} - http://www.metasploit.com\n" +
|
||||
"#{payload.datastore.to_s}\n" +
|
||||
"#{ds}" +
|
||||
((opts['Encoder']) ? "Encoder=" + opts['Encoder'].refname + "\n" : ''), fmt) + buf
|
||||
end
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ class DataStore < Hash
|
|||
if (var == nil or val == nil)
|
||||
var = "unknown" if (!var)
|
||||
|
||||
raise ArgumentParseError, "Invalid option specified: #{var}", caller
|
||||
raise Rex::ArgumentParseError, "Invalid option specified: #{var}", caller
|
||||
end
|
||||
|
||||
# Store the value
|
||||
|
|
|
@ -140,7 +140,9 @@ class Module
|
|||
# Return a comma separated list of supported platforms, if any
|
||||
#
|
||||
def platform_to_s
|
||||
return platform.join(", ")
|
||||
# TODO: fix me spoonm!
|
||||
|
||||
return "TODO"
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue