Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

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