Skip to content

Commit 8c04df4

Browse files
committed
[FixRM: rapid7#7535] Missing normalize() in OptPort
[FixRM: rapid7#7535] - Sometimes OptPort can return as a String instead of Fixnum because OptPort is missing the normalize() function.
1 parent 4adf429 commit 8c04df4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/msf/core/option_container.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,10 @@ def type
302302
return 'port'
303303
end
304304

305+
def normalize(value)
306+
value.to_i
307+
end
308+
305309
def valid?(value)
306310
return false if empty_required_value?(value)
307311

0 commit comments

Comments
 (0)