Fix up the dialup code
git-svn-id: file:///home/svn/framework3/trunk@6150 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
6777023871
commit
cb327d40fc
|
@ -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
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -25,7 +25,7 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
[
|
||||
'I)ruid',
|
||||
],
|
||||
'Arch' => ARCH_CMD,
|
||||
'Arch' => ARCH_TTY,
|
||||
'Platform' => ['unix'],
|
||||
'License' => MSF_LICENSE,
|
||||
'Payload' =>
|
||||
|
@ -34,10 +34,6 @@ class Metasploit3 < Msf::Exploit::Remote
|
|||
'BadChars' => '',
|
||||
'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
|
||||
|
|
Loading…
Reference in New Issue