Skip to content

Commit 2b57755

Browse files
committed
OptEnum option changed
1 parent 64d21c7 commit 2b57755

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

modules/post/windows/manage/portproxy.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize(info={})
2929
OptAddress.new('CADDRESS', [ true, 'IPv4/IPv6 address to which to connect.']),
3030
OptInt.new( 'CPORT', [ true, 'Port number to which to connect.']),
3131
OptInt.new( 'LPORT', [ true, 'Port number to which to listen.']),
32-
OptString.new( 'TYPE', [ true, 'Type of forwarding. Valid values: v4tov4, v6tov6, v6tov4, v4tov6.',"v4tov4"])
32+
OptEnum.new( 'TYPE', [ true, 'Type of forwarding', 'v4tov4', ['v4tov4','v6tov6','v6tov4','v4tov6']])
3333
], self.class)
3434
end
3535

@@ -39,11 +39,6 @@ def run
3939
return
4040
end
4141

42-
if not ['v4tov4', 'v6tov6', 'v6tov4','v4tov6'].include? datastore['TYPE']
43-
print_error("TYPE value incorrect. Valid values: v4tov4, v6tov6, v6tov4, v4tov6.")
44-
return
45-
end
46-
4742
type = datastore['TYPE']
4843
lport = datastore['LPORT']
4944
cport = datastore['CPORT']

0 commit comments

Comments
 (0)