Files
metasploit-gs/lib/msf/core/handler/find_tty.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

54 lines
891 B
Ruby
Raw Normal View History

# -*- coding: binary -*-
module Msf
module Handler
###
#
2015-04-13 13:21:41 +05:00
# This handler expects an interactive TTY on the supplied socket/io object
#
###
module FindTty
include FindPort
2013-08-30 16:28:33 -05:00
#
# Returns the string representation of the handler type, in this case
2009-01-14 05:46:10 +00:00
# 'none', which is kind of a lie, but we don't have a better way to
# handle this yet
#
def self.handler_type
2009-01-14 05:46:10 +00:00
return "none"
end
2013-08-30 16:28:33 -05:00
#
# Returns the connection oriented general handler type, in this case
2009-01-14 05:46:10 +00:00
# 'none'
#
def self.general_handler_type
2009-01-14 05:46:10 +00:00
"none"
end
2013-08-30 16:28:33 -05:00
#
# Remove the CPORT option from our included FindPort class
#
def initialize(info = {})
super
options.remove_option('CPORT')
end
protected
def _check_shell(sock)
2009-01-14 05:46:10 +00:00
# Verify that the modem is online
if(sock.respond_to?('commandstate'))
return (sock.commandstate ? false : true)
end
return true
end
end
end
end