Browse Source

Fixed anonymize map call.

master
Christian P. MOMON 5 months ago
parent
commit
192001bbd4
  1. 8
      src/fr/devinsy/logar/app/anonymizer/Anonymizer.java

8
src/fr/devinsy/logar/app/anonymizer/Anonymizer.java

@ -47,8 +47,8 @@ public final class Anonymizer
{
private static Logger logger = LoggerFactory.getLogger(Anonymizer.class);
public static final Pattern IPV4_PATTERN = Pattern.compile("\\d{0,3}\\.\\d{0,3}\\.\\d{0,3}\\.\\d{0,3}");
public static final Pattern IPV6_PATTERN = Pattern.compile("([0-9a-f]{1,4}:{1,2}){4,7}([0-9a-f]){1,4}", Pattern.CASE_INSENSITIVE);
public static final Pattern IPV4_PATTERN = Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
public static final Pattern IPV6_PATTERN = Pattern.compile("([0-9a-f]){1,4}(:{1,2}[0-9a-f]{0,4}){4,7}", Pattern.CASE_INSENSITIVE);
private AnonMap map;
@ -206,7 +206,7 @@ public final class Anonymizer
String ipv4 = matcher.group();
String right = anonLine.substring(matcher.end());
String anonIpv4 = this.map.get(ipv4);
String anonIpv4 = this.map.anonymizeIp(ipv4);
anonLine = left + anonIpv4 + right;
}
@ -218,7 +218,7 @@ public final class Anonymizer
String ipv6 = matcher.group();
String right = anonLine.substring(matcher.end());
String anonIpv6 = this.map.get(ipv6);
String anonIpv6 = this.map.anonymizeIp(ipv6);
anonLine = left + anonIpv6 + right;
}

Loading…
Cancel
Save