2012-06-29 00:18:28 -05:00
|
|
|
# -*- coding: binary -*-
|
2005-12-26 14:34:22 +00:00
|
|
|
|
|
|
|
|
module Msf
|
|
|
|
|
module Handler
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
|
#
|
|
|
|
|
# This handler expects a plain Unix command shell on the supplied socket
|
|
|
|
|
#
|
|
|
|
|
###
|
|
|
|
|
module FindShell
|
|
|
|
|
|
|
|
|
|
include FindPort
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
#
|
|
|
|
|
# Returns the string representation of the handler type, in this case
|
2012-03-30 16:30:13 -06:00
|
|
|
# 'find_shell'.
|
2005-12-26 14:34:22 +00:00
|
|
|
#
|
|
|
|
|
def self.handler_type
|
|
|
|
|
return "find_shell"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
#
|
|
|
|
|
# Returns the connection oriented general handler type, in this case
|
|
|
|
|
# 'find'.
|
|
|
|
|
#
|
|
|
|
|
def self.general_handler_type
|
|
|
|
|
"find"
|
|
|
|
|
end
|
2013-08-30 16:28:33 -05:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
#
|
|
|
|
|
# Remove the CPORT option from our included FindPort class
|
|
|
|
|
#
|
|
|
|
|
def initialize(info = {})
|
|
|
|
|
super
|
|
|
|
|
options.remove_option('CPORT')
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
protected
|
|
|
|
|
|
2011-11-20 12:32:06 +11:00
|
|
|
|
2005-12-26 14:34:22 +00:00
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
2011-11-20 12:32:06 +11:00
|
|
|
end
|