Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

@@ 3763-3774 (lines=12) @@
3760
		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3761
		$max = ($mode == ':' ? 'ffff' : '255');
3762
		$min = 0;
3763
		if(!$valid_low)
3764
		{
3765
			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3766
			$valid_low = isValidIP($ip_parts[0]);
3767
			while (!$valid_low)
3768
			{
3769
				$ip_parts[0] .= $mode . $min;
3770
				$valid_low = isValidIP($ip_parts[0]);
3771
				$count++;
3772
				if ($count > 9) break;
3773
			}
3774
		}
3775
3776
		$count = 0;
3777
		if(!$valid_high)
@@ 3777-3788 (lines=12) @@
3774
		}
3775
3776
		$count = 0;
3777
		if(!$valid_high)
3778
		{
3779
			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3780
			$valid_high = isValidIP($ip_parts[1]);
3781
			while (!$valid_high)
3782
			{
3783
				$ip_parts[1] .= $mode . $max;
3784
				$valid_high = isValidIP($ip_parts[1]);
3785
				$count++;
3786
				if ($count > 9) break;
3787
			}
3788
		}
3789
3790
		if($valid_high && $valid_low)
3791
		{