Switch to a future compatible method of when/case

git-svn-id: file:///home/svn/framework3/trunk@6311 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-03-07 18:18:38 +00:00
parent 69c169bb2f
commit 2b2c6b983e
1 changed files with 8 additions and 8 deletions

View File

@ -45,16 +45,16 @@ module Exploit::Remote::Dialup
data_bits = datastore['DATABITS'].to_i
stop_bits = datastore['STOPBITS'].to_i
parity = case datastore['PARITY']
when 'Even' : Telephony::Modem::EVEN
when 'Odd' : Telephony::Modem::ODD
when 'Mark' : Telephony::Modem::MARK
when 'Space': Telephony::Modem::SPACE
when 'Even' ; Telephony::Modem::EVEN
when 'Odd' ; Telephony::Modem::ODD
when 'Mark' ; Telephony::Modem::MARK
when 'Space'; Telephony::Modem::SPACE
else Telephony::Modem::NONE
end
flowcontrol = case datastore['FLOWCONTROL']
when 'Hardware' : Telephony::Modem::HARD
when 'Software' : Telephony::Modem::SOFT
when 'Both' : Telephony::Modem::HARD | Telephony::Modem::SOFT
when 'Hardware' ; Telephony::Modem::HARD
when 'Software' ; Telephony::Modem::SOFT
when 'Both' ; Telephony::Modem::HARD | Telephony::Modem::SOFT
else Telephony::Modem::NONE
end
@ -97,7 +97,7 @@ module Exploit::Remote::Dialup
end
case result
when /CONNECT/i:
when /CONNECT/i
print_status("Carrier: #{result}" )
self.modem = modem if global
return modem