We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16030cd commit 53b989fCopy full SHA for 53b989f
lib/msf/core/opt_int.rb
@@ -15,8 +15,10 @@ def type
15
def normalize(value)
16
if value.to_s.match(/^0x[a-fA-F\d]+$/)
17
value.to_i(16)
18
- else
+ elsif value.present?
19
value.to_i
20
+ else
21
+ nil
22
end
23
24
lib/msf/core/opt_port.rb
@@ -13,7 +13,7 @@ def type
13
14
def valid?(value, check_empty: true)
- port = normalize(value)
+ port = normalize(value).to_i
super && port <= 65535 && port >= 0
0 commit comments