Fix up the dialup code

git-svn-id: file:///home/svn/framework3/trunk@6150 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-01-14 05:46:10 +00:00
parent 6777023871
commit cb327d40fc
3 changed files with 13 additions and 26 deletions

View File

@ -14,18 +14,19 @@ module FindTty
#
# Returns the string representation of the handler type, in this case
# 'find_tag'.
# 'none', which is kind of a lie, but we don't have a better way to
# handle this yet
#
def self.handler_type
return "find_shell"
return "none"
end
#
# Returns the connection oriented general handler type, in this case
# 'find'.
# 'none'
#
def self.general_handler_type
"find"
"none"
end
#
@ -39,6 +40,7 @@ module FindTty
protected
def _check_shell(sock)
# Verify that the modem is online
if(sock.respond_to?('commandstate'))
return (sock.commandstate ? false : true)
end

View File

@ -18,7 +18,7 @@ module Payload::Generic
#
def initialize(info = {})
super(merge_info(info,
'Arch' => ARCH_ALL,
'Arch' => ARCH_ALL - [ARCH_TTY],
'Platform' => ''))
register_advanced_options(
@ -249,4 +249,4 @@ protected
end
end
end

View File

@ -25,19 +25,15 @@ class Metasploit3 < Msf::Exploit::Remote
[
'I)ruid',
],
'Arch' => ARCH_CMD,
'Arch' => ARCH_TTY,
'Platform' => ['unix'],
'License' => MSF_LICENSE,
'Payload' =>
{
'Space' => 1000,
'BadChars' => '',
'DisableNops' => true,
'DisableNops' => true,
},
'PayloadCompat' =>
{
'PayloadType' => 'cmd_tty',
},
'Targets' =>
[
['Automatic', { } ],
@ -48,20 +44,9 @@ class Metasploit3 < Msf::Exploit::Remote
end
def exploit
# Connect to the system via dialup
modem = connect_dialup
if ! modem
print_error("Unable to connect.")
return
end
# Log in
# Handoff to the shell handler
modem.display = false
handler(modem.sock)
disconnect_dialup(modem)
connect_dialup
handler
disconnect_dialup
end
end