diff --git a/lib/msf/core/exploit/dialup.rb b/lib/msf/core/exploit/dialup.rb index 237219ba3a..ad5e997d7f 100644 --- a/lib/msf/core/exploit/dialup.rb +++ b/lib/msf/core/exploit/dialup.rb @@ -1,4 +1,3 @@ -require 'serialport' require 'telephony' @@ -17,7 +16,7 @@ module Exploit::Remote::Dialup OptString.new('DIALSUFFIX', [false, 'Dial Suffix', nil]), OptInt.new( 'DIALTIMEOUT', [true, 'Dial Timeout in seconds', 60]), OptBool.new( 'DISPLAYMODEM', [true, 'Displays modem commands and responses on the console', false]), - OptEnum.new( 'FLOWCONTROL', [true, 'Flow Control', 'None', ['None', 'Hardware', 'Software'], 'None']), + OptEnum.new( 'FLOWCONTROL', [true, 'Flow Control', 'None', ['None', 'Hardware', 'Software', 'Both'], 'None']), OptString.new('INITSTRING', [true, 'Initialization String', 'AT X6 S11=80']), OptString.new('NUMBER', [true, 'Number to Dial (e.g. 1.800.950.9955, (202) 358-1234, 358.1234 etc.)', nil]), OptEnum.new( 'PARITY', [true, 'Parity (Mark & Space are Windows Only)', 'None', ['None', 'Even', 'Odd', 'Mark', 'Space'], 'None']), @@ -35,11 +34,17 @@ module Exploit::Remote::Dialup data_bits = datastore['DATABITS'].to_i stop_bits = datastore['STOPBITS'].to_i parity = case datastore['PARITY'] - when 'Even' : SerialPort::EVEN - when 'Odd' : SerialPort::ODD - when 'Mark' : SerialPort::MARK - when 'Space': SerialPort::SPACE - else SerialPort::NONE + when 'Even' : Modem::EVEN + when 'Odd' : Modem::ODD + when 'Mark' : Modem::MARK + when 'Space': Modem::SPACE + else Modem::NONE + end + flowcontrol = case datastore['FLOWCONTROL'] + when 'Hardware' : Modem::HARD + when 'Software' : Modem::SOFT + when 'Both' : Modem::HARD | Modem::SOFT + else : Modem::NONE end initstring = datastore['INITSTRING'] dialprefix = datastore['DIALPREFIX'] @@ -54,6 +59,7 @@ module Exploit::Remote::Dialup 'parity' => parity, 'stop_bits' => stop_bits } + modem.flow_control = flowcontrol modem.display = datastore['DISPLAYMODEM'] print_status("Initializing Modem")