summaryrefslogtreecommitdiff
path: root/scripts/firewall/valid_port_range.pl
blob: 1f3b3fcd318838213fe1acdf245245d19b8d42f0 (plain)
1
2
3
4
5
#!/usr/bin/env perl

$arg = $ARGV[0];

exit(1) unless $arg =~ /^!?((\d+|\d+-\d+|[a-zA-Z0-9\-]+),)*((\d+|\d+-\d+|[a-zA-Z0-9\-]+))$/;