Compatible encoder list from Diaul
git-svn-id: file:///home/svn/framework3/trunk@4235 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
parent
214eb2a019
commit
43df6869b2
|
@ -673,6 +673,24 @@ class Exploit < Msf::Module
|
|||
return payloads;
|
||||
end
|
||||
|
||||
#
|
||||
# Returns a list of compatible encoders based on architecture
|
||||
#
|
||||
def compatible_encoders
|
||||
encoders = []
|
||||
|
||||
c_platform = (target and target.platform) ? target.platform : platform
|
||||
c_arch = (target and target.arch) ? target.arch : (arch == []) ? nil : arch
|
||||
|
||||
framework.encoders.each_module(
|
||||
'Arch' => c_arch) { |name, mod|
|
||||
|
||||
encoders << [ name, mod ]
|
||||
}
|
||||
|
||||
return encoders;
|
||||
end
|
||||
|
||||
#
|
||||
# This method returns the number of bytes that should be adjusted to the
|
||||
# stack pointer prior to executing any code. The number of bytes to adjust
|
||||
|
|
|
@ -1272,11 +1272,23 @@ protected
|
|||
#
|
||||
# Module list enumeration
|
||||
#
|
||||
|
||||
|
||||
def show_encoders # :nodoc:
|
||||
show_module_set("Encoders", framework.encoders)
|
||||
end
|
||||
# If an active module has been selected and it's an exploit, get the
|
||||
# list of compatible encoders and display them
|
||||
if (active_module and active_module.exploit? == true)
|
||||
tbl = generate_module_table("Compatible encoders")
|
||||
|
||||
active_module.compatible_encoders.each { |refname, encoder|
|
||||
tbl << [ refname, encoder.new.name ]
|
||||
}
|
||||
|
||||
print(tbl.to_s)
|
||||
else
|
||||
show_module_set("Encoders", framework.encoders)
|
||||
end
|
||||
end
|
||||
|
||||
def show_nops # :nodoc:
|
||||
show_module_set("NOP Generators", framework.nops)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue