You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd be really nice if OptEnum were updated to validate values without being case sensitive while preserving the case the author was expecting.
For example a setting OptEnum.new('PROTOCOL', [true, 'Protocol to use.', 'TCP', [ 'TCP', 'UDP', 'ALL' ]]), should accept all and normalize it to ALL.
In the vast majority (maybe all) cases of OptEnum's being used, the values are all unique regardless of case. Allowing the user to set them to their value without needing to worry about the details of how the casing was defined by the author would be a nice improvement. If the possible values are case sensitive
(opts.length == opts.map(&:upcase).uniq.length) then this should be disabled for the option.
Simple example
In this case "all" is explicit enough to be differentiated from "TCP" and "UDP".
msf6 post(multi/recon/multiport_egress_traffic) > show options
Module options (post/multi/recon/multiport_egress_traffic):
Name Current Setting Required Description
---- --------------- -------- -----------
METHOD NATIVE yes The mechanism by which the packets are generated. Can be NATIVE or WINAPI (Windows only). (Accepted: NATIVE, WINAPI)
PORTS 22,23,53,80,88,443,445,33434-33534 yes Ports to test.
PROTOCOL TCP yes Protocol to use. (Accepted: TCP, UDP, ALL)
SESSION yes The session to run this module on
TARGET yes Destination IP address.
THREADS 20 yes Number of simultaneous threads/connections to try.
View the full module info with the info, or info -d command.
msf6 post(multi/recon/multiport_egress_traffic) > set PROTOCOL all
[-] The following options failed to validate: Value 'all' is not valid for option 'PROTOCOL'.
PROTOCOL => TCP
The text was updated successfully, but these errors were encountered:
It'd be really nice if
OptEnum
were updated to validate values without being case sensitive while preserving the case the author was expecting.For example a setting
OptEnum.new('PROTOCOL', [true, 'Protocol to use.', 'TCP', [ 'TCP', 'UDP', 'ALL' ]]),
should acceptall
and normalize it toALL
.In the vast majority (maybe all) cases of OptEnum's being used, the values are all unique regardless of case. Allowing the user to set them to their value without needing to worry about the details of how the casing was defined by the author would be a nice improvement. If the possible values are case sensitive
(
opts.length == opts.map(&:upcase).uniq.length
) then this should be disabled for the option.Simple example
In this case "all" is explicit enough to be differentiated from "TCP" and "UDP".
The text was updated successfully, but these errors were encountered: