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 # 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 def self.handler_type
return "find_shell" return "none"
end end
# #
# Returns the connection oriented general handler type, in this case # Returns the connection oriented general handler type, in this case
# 'find'. # 'none'
# #
def self.general_handler_type def self.general_handler_type
"find" "none"
end end
# #
@ -39,6 +40,7 @@ module FindTty
protected protected
def _check_shell(sock) def _check_shell(sock)
# Verify that the modem is online
if(sock.respond_to?('commandstate')) if(sock.respond_to?('commandstate'))
return (sock.commandstate ? false : true) return (sock.commandstate ? false : true)
end end

View File

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

View File

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