Code Duplication    Length = 12-12 lines in 2 locations

Sources/Subs.php 2 locations

@@ 3783-3794 (lines=12) @@
3780
		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3781
		$max = ($mode == ':' ? 'ffff' : '255');
3782
		$min = 0;
3783
		if(!$valid_low)
3784
		{
3785
			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3786
			$valid_low = isValidIP($ip_parts[0]);
3787
			while (!$valid_low)
3788
			{
3789
				$ip_parts[0] .= $mode . $min;
3790
				$valid_low = isValidIP($ip_parts[0]);
3791
				$count++;
3792
				if ($count > 9) break;
3793
			}
3794
		}
3795
3796
		$count = 0;
3797
		if(!$valid_high)
@@ 3797-3808 (lines=12) @@
3794
		}
3795
3796
		$count = 0;
3797
		if(!$valid_high)
3798
		{
3799
			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3800
			$valid_high = isValidIP($ip_parts[1]);
3801
			while (!$valid_high)
3802
			{
3803
				$ip_parts[1] .= $mode . $max;
3804
				$valid_high = isValidIP($ip_parts[1]);
3805
				$count++;
3806
				if ($count > 9) break;
3807
			}
3808
		}
3809
3810
		if($valid_high && $valid_low)
3811
		{