Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

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