Changeset 6150

Show
Ignore:
Timestamp:
01/13/09 21:46:10 (6 months ago)
Author:
hdm
Message:

Fix up the dialup code

Location:
framework3/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • framework3/trunk/lib/msf/core/handler/find_tty.rb

    r6139 r6150  
    1515        # 
    1616        # Returns the string representation of the handler type, in this case 
    17         # 'find_tag'. 
     17        # 'none', which is kind of a lie, but we don't have a better way to 
     18        # handle this yet 
    1819        # 
    1920        def self.handler_type 
    20                 return "find_shell" 
     21                return "none" 
    2122        end 
    2223 
    2324        # 
    2425        # Returns the connection oriented general handler type, in this case 
    25         # 'find'. 
     26        # 'none' 
    2627        # 
    2728        def self.general_handler_type 
    28                 "find" 
     29                "none" 
    2930        end 
    3031 
     
    4041 
    4142        def _check_shell(sock) 
     43                # Verify that the modem is online 
    4244                if(sock.respond_to?('commandstate')) 
    4345                        return (sock.commandstate ? false : true) 
  • framework3/trunk/lib/msf/core/payload/generic.rb

    r5773 r6150  
    1919        def initialize(info = {}) 
    2020                super(merge_info(info, 
    21                         'Arch'     => ARCH_ALL, 
     21                        'Arch'     => ARCH_ALL - [ARCH_TTY], 
    2222                        'Platform' => '')) 
    2323 
  • framework3/trunk/modules/exploits/test/dialup.rb

    r6120 r6150  
    2626                                        'I)ruid', 
    2727                                ], 
    28                         'Arch'          => ARCH_CMD, 
     28                        'Arch'          => ARCH_TTY, 
    2929                        'Platform'      => ['unix'], 
    3030                        'License'       => MSF_LICENSE, 
     
    3333               'Space'    => 1000, 
    3434               'BadChars' => '', 
    35                                         'DisableNops' => true, 
     35                           'DisableNops' => true, 
    3636            }, 
    37                         'PayloadCompat' => 
    38                                 { 
    39                                         'PayloadType' => 'cmd_tty', 
    40                                 }, 
    4137         'Targets'        => 
    4238            [ 
     
    4945 
    5046        def exploit 
    51                 # Connect to the system via dialup 
    52                 modem = connect_dialup 
    53                 if ! modem 
    54                         print_error("Unable to connect.") 
    55                         return 
    56                 end 
    57  
    58                 # Log in  
    59  
    60                 # Handoff to the shell handler 
    61                 modem.display = false 
    62                 handler(modem.sock) 
    63  
    64                 disconnect_dialup(modem) 
     47                connect_dialup 
     48                handler 
     49                disconnect_dialup 
    6550        end 
    6651