Skip to content

Commit 6ba5e9c

Browse files
committed
Land rapid7#7537, action port fix for phoenix_command
2 parents 265567f + 92964c1 commit 6ba5e9c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/auxiliary/admin/scada/phoenix_command.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def initialize(info = {})
2020
It allows a remote user to read out the PLC Type, Firmware and
2121
Build number on port TCP/1962.
2222
And also to read out the CPU State (Running or Stopped) AND start
23-
or stop the CPU on port TCP/20547 (confirmed ILC 15x and 17x series)
24-
or on port TCP/41100 (confirmed ILC 39x series)
23+
or stop the CPU on port TCP/41100 (confirmed ILC 15x and 17x series)
24+
or on port TCP/20547 (confirmed ILC 39x series)
2525
},
2626
'Author' => 'Tijl Deneut <tijl.deneut[at]howest.be>',
2727
'License' => MSF_LICENSE,
@@ -211,11 +211,11 @@ def run
211211
if device.start_with?('ILC 15', 'ILC 17')
212212
devicetype = '15x'
213213
print_status('--> Detected 15x/17x series, getting current CPU state:')
214-
ractionport == 0 ? (rport = 41100) : (rport = ractionport)
214+
ractionport.nil? (rport = 41100) : (rport = ractionport)
215215
elsif device.start_with?('ILC 39')
216216
devicetype = '39x'
217217
print_status('--> Detected 39x series, getting current CPU state:')
218-
ractionport == 0 ? (rport = 20547) : (rport = ractionport)
218+
ractionport.nil? (rport = 20547) : (rport = ractionport)
219219
else
220220
print_error('Only ILC and (some) RFC devices are supported.')
221221
return

0 commit comments

Comments
 (0)