Cosmetic changes, removal of advanced/evasion options from dumps

git-svn-id: file:///home/svn/framework3/trunk@4085 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2006-10-29 17:31:53 +00:00
parent b4742a1252
commit 6c245f561c
2 changed files with 8 additions and 64 deletions

View File

@ -10,14 +10,14 @@ module Serializer
###
class ReadableText
DefaultColumnWrap = 60
DefaultIndent = 4
DefaultColumnWrap = 70
DefaultIndent = 2
#
# Returns a formatted string that contains information about
# the supplied module instance.
#
def self.dump_module(mod, indent = " ")
def self.dump_module(mod, indent = " ")
case mod.type
when MODULE_PAYLOAD
return dump_payload_module(mod, indent)
@ -120,24 +120,10 @@ class ReadableText
# Options
if (mod.options.has_options?)
output += "Available options:\n"
output += "Basic options:\n"
output += dump_options(mod, indent)
output += "\n"
end
# Advanced options
if (mod.options.has_advanced_options?)
output += "Advanced options:\n"
output += dump_advanced_options(mod, indent)
output += "\n"
end
# Evasion options
if (mod.options.has_evasion_options?)
output += "Evasion options:\n"
output += dump_evasion_options(mod, indent)
output += "\n"
end
# Payload information
if (mod.payload_info.length)
@ -187,24 +173,10 @@ class ReadableText
# Options
if (mod.options.has_options?)
output += "Available options:\n"
output += "Basic options:\n"
output += dump_options(mod, indent)
output += "\n"
end
# Advanced options
if (mod.options.has_advanced_options?)
output += "Advanced options:\n"
output += dump_advanced_options(mod, indent)
output += "\n"
end
# Advanced options
if (mod.options.has_evasion_options?)
output += "Evasion options:\n"
output += dump_evasion_options(mod, indent)
output += "\n"
end
# Description
output += "Description:\n"
@ -237,25 +209,11 @@ class ReadableText
# Options
if (mod.options.has_options?)
output += "Available options:\n"
output += "Basic options:\n"
output += dump_options(mod)
output += "\n"
end
# Advanced options
if (mod.options.has_advanced_options?)
output += "Advanced options:\n"
output += dump_advanced_options(mod)
output += "\n"
end
# Evasion options
if (mod.options.has_evasion_options?)
output += "Evasion options:\n"
output += dump_evasion_options(mod)
output += "\n"
end
# Description
output += "Description:\n"
output += word_wrap(Rex::Text.compress(mod.description))
@ -282,20 +240,6 @@ class ReadableText
output += indent + author.to_s + "\n"
}
output += "\n"
# Advanced options
if (mod.options.has_advanced_options?)
output += "Advanced options:\n"
output += dump_advanced_options(mod)
output += "\n"
end
# Evasion options
if (mod.options.has_evasion_options?)
output += "Evasion options:\n"
output += dump_evasion_options(mod)
output += "\n"
end
# Description
output += "Description:\n"
@ -461,7 +405,7 @@ class ReadableText
# Jacked from Ernest Ellingson <erne [at] powernav.com>, modified
# a bit to add indention
#
def self.word_wrap(str, indent = 4, col = DefaultColumnWrap)
def self.word_wrap(str, indent = DefaultIndent, col = DefaultColumnWrap)
return Rex::Text.wordwrap(str, indent, col)
end

View File

@ -216,7 +216,7 @@ class Module
# Return the module's version information.
#
def version
module_info['Version']
module_info['Version'].gsub(/\$Rev.s.on:\s+|\s+\$$/, '')
end
#