add a Post.create method that makes testing post module stuff in IRB a lot easier. try this from a meterpreter irb prompt: pry Msf::Module::Post.create(client)
git-svn-id: file:///home/svn/framework3/trunk@13087 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
44d7503cc1
commit
47a551468b
|
@ -96,6 +96,24 @@ class Post < Msf::Module
|
||||||
sessions
|
sessions
|
||||||
end
|
end
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create an anonymous module not tied to a file. Only useful for IRB.
|
||||||
|
#
|
||||||
|
def self.create(session)
|
||||||
|
mod = new
|
||||||
|
mod.instance_variable_set(:@session, session)
|
||||||
|
# Have to override inspect because for whatever reason, +type+ is coming
|
||||||
|
# from the wrong scope and i can't figure out how to fix it.
|
||||||
|
mod.instance_eval do
|
||||||
|
def inspect
|
||||||
|
"#<Msf::Post anonymous>"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
mod.class.refname = "anonymous"
|
||||||
|
|
||||||
|
mod
|
||||||
|
end
|
||||||
|
|
||||||
#
|
#
|
||||||
# Return false if the given session is not compatible with this module
|
# Return false if the given session is not compatible with this module
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue