Cosmetic changes, removal of advanced/evasion options from dumps
git-svn-id: file:///home/svn/framework3/trunk@4085 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b4742a1252
commit
6c245f561c
|
@ -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,25 +120,11 @@ 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)
|
||||
output += "Payload information:\n"
|
||||
|
@ -187,25 +173,11 @@ 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"
|
||||
output += word_wrap(Rex::Text.compress(mod.description))
|
||||
|
@ -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))
|
||||
|
@ -283,20 +241,6 @@ class ReadableText
|
|||
}
|
||||
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"
|
||||
output += word_wrap(Rex::Text.compress(mod.description))
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue