NetMirror.apk
Download file
package N2;
import D2.h;
import K2.o;
import b3.i;
import java.net.IDN;
import java.net.InetAddress;
import java.util.Locale;
/* JADX INFO: loaded from: classes.dex */
public abstract class a {
private static final boolean a(String str) {
int length = str.length();
for (int i3 = 0; i3 < length; i3++) {
char cCharAt = str.charAt(i3);
if (h.g(cCharAt, 31) <= 0 || h.g(cCharAt, 127) >= 0 || o.N(" #%/:?@[\\]", cCharAt, 0, false, 6, null) != -1) {
return true;
}
}
return false;
}
private static final boolean b(String str, int i3, int i4, byte[] bArr, int i5) {
int i6 = i5;
while (i3 < i4) {
if (i6 == bArr.length) {
return false;
}
if (i6 != i5) {
if (str.charAt(i3) != '.') {
return false;
}
i3++;
}
int i7 = i3;
int i8 = 0;
while (i7 < i4) {
char cCharAt = str.charAt(i7);
if (h.g(cCharAt, 48) < 0 || h.g(cCharAt, 57) > 0) {
break;
}
if ((i8 == 0 && i3 != i7) || (i8 = ((i8 * 10) + cCharAt) - 48) > 255) {
return false;
}
i7++;
}
if (i7 - i3 == 0) {
return false;
}
bArr[i6] = (byte) i8;
i6++;
i3 = i7;
}
return i6 == i5 + 4;
}
/* JADX WARN: Code restructure failed: missing block: B:42:0x0097, code lost:
if (r13 == 16) goto L46;
*/
/* JADX WARN: Code restructure failed: missing block: B:43:0x0099, code lost:
if (r14 != (-1)) goto L45;
*/
/* JADX WARN: Code restructure failed: missing block: B:44:0x009b, code lost:
return null;
*/
/* JADX WARN: Code restructure failed: missing block: B:45:0x009c, code lost:
r0 = r13 - r14;
java.lang.System.arraycopy(r9, r14, r9, 16 - r0, r0);
java.util.Arrays.fill(r9, r14, (16 - r13) + r14, (byte) 0);
*/
/* JADX WARN: Code restructure failed: missing block: B:47:0x00ae, code lost:
return java.net.InetAddress.getByAddress(r9);
*/
/* JADX WARN: Removed duplicated region for block: B:31:0x006b */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
private static final java.net.InetAddress c(java.lang.String r18, int r19, int r20) {
/*
r6 = r18
r7 = r20
r8 = 16
byte[] r9 = new byte[r8]
r11 = -1
r12 = r19
r14 = r11
r15 = r14
r13 = 0
Le:
r16 = 0
if (r12 >= r7) goto L97
if (r13 != r8) goto L15
return r16
L15:
int r5 = r12 + 2
if (r5 > r7) goto L38
r4 = 4
r17 = 0
java.lang.String r1 = "::"
r3 = 0
r0 = r18
r2 = r12
r10 = r5
r5 = r17
boolean r0 = K2.o.y(r0, r1, r2, r3, r4, r5)
if (r0 == 0) goto L38
if (r14 == r11) goto L2e
return r16
L2e:
int r13 = r13 + 2
if (r10 != r7) goto L35
r14 = r13
goto L97
L35:
r15 = r10
r14 = r13
goto L67
L38:
if (r13 == 0) goto L4a
r4 = 4
r5 = 0
java.lang.String r1 = ":"
r3 = 0
r0 = r18
r2 = r12
boolean r0 = K2.o.y(r0, r1, r2, r3, r4, r5)
if (r0 == 0) goto L4c
int r12 = r12 + 1
L4a:
r15 = r12
goto L67
L4c:
r4 = 4
r5 = 0
java.lang.String r1 = "."
r3 = 0
r0 = r18
r2 = r12
boolean r0 = K2.o.y(r0, r1, r2, r3, r4, r5)
if (r0 == 0) goto L66
int r0 = r13 + (-2)
boolean r0 = b(r6, r15, r7, r9, r0)
if (r0 != 0) goto L63
return r16
L63:
int r13 = r13 + 2
goto L97
L66:
return r16
L67:
r12 = r15
r0 = 0
L69:
if (r12 >= r7) goto L7c
char r1 = r6.charAt(r12)
int r1 = N2.c.F(r1)
if (r1 != r11) goto L76
goto L7c
L76:
int r0 = r0 << 4
int r0 = r0 + r1
int r12 = r12 + 1
goto L69
L7c:
int r1 = r12 - r15
if (r1 == 0) goto L96
r2 = 4
if (r1 <= r2) goto L84
goto L96
L84:
int r1 = r13 + 1
int r2 = r0 >>> 8
r2 = r2 & 255(0xff, float:3.57E-43)
byte r2 = (byte) r2
r9[r13] = r2
int r13 = r13 + 2
r0 = r0 & 255(0xff, float:3.57E-43)
byte r0 = (byte) r0
r9[r1] = r0
goto Le
L96:
return r16
L97:
if (r13 == r8) goto Laa
if (r14 != r11) goto L9c
return r16
L9c:
int r0 = r13 - r14
int r1 = 16 - r0
java.lang.System.arraycopy(r9, r14, r9, r1, r0)
int r8 = r8 - r13
int r8 = r8 + r14
r0 = 0
byte r0 = (byte) r0
java.util.Arrays.fill(r9, r14, r8, r0)
Laa:
java.net.InetAddress r0 = java.net.InetAddress.getByAddress(r9)
return r0
*/
throw new UnsupportedOperationException("Method not decompiled: N2.a.c(java.lang.String, int, int):java.net.InetAddress");
}
private static final String d(byte[] bArr) {
int i3 = -1;
int i4 = 0;
int i5 = 0;
int i6 = 0;
while (i5 < bArr.length) {
int i7 = i5;
while (i7 < 16 && bArr[i7] == 0 && bArr[i7 + 1] == 0) {
i7 += 2;
}
int i8 = i7 - i5;
if (i8 > i6 && i8 >= 4) {
i3 = i5;
i6 = i8;
}
i5 = i7 + 2;
}
i iVar = new i();
while (i4 < bArr.length) {
if (i4 == i3) {
iVar.L(58);
i4 += i6;
if (i4 == 16) {
iVar.L(58);
}
} else {
if (i4 > 0) {
iVar.L(58);
}
iVar.n((c.b(bArr[i4], 255) << 8) | c.b(bArr[i4 + 1], 255));
i4 += 2;
}
}
return iVar.O();
}
public static final String e(String str) {
h.f(str, "$this$toCanonicalHost");
if (!o.E(str, ":", false, 2, null)) {
try {
String ascii = IDN.toASCII(str);
h.e(ascii, "IDN.toASCII(host)");
Locale locale = Locale.US;
h.e(locale, "Locale.US");
if (ascii == null) {
throw new NullPointerException("null cannot be cast to non-null type java.lang.String");
}
String lowerCase = ascii.toLowerCase(locale);
h.e(lowerCase, "(this as java.lang.String).toLowerCase(locale)");
if (lowerCase.length() != 0 && !a(lowerCase)) {
return lowerCase;
}
return null;
} catch (IllegalArgumentException unused) {
return null;
}
}
InetAddress inetAddressC = (o.z(str, "[", false, 2, null) && o.m(str, "]", false, 2, null)) ? c(str, 1, str.length() - 1) : c(str, 0, str.length());
if (inetAddressC == null) {
return null;
}
byte[] address = inetAddressC.getAddress();
if (address.length == 16) {
h.e(address, "address");
return d(address);
}
if (address.length == 4) {
return inetAddressC.getHostAddress();
}
throw new AssertionError("Invalid IPv6 address: '" + str + '\'');
}
}
⚠️ This content was hidden by an advertisement filtering extension in your browser. Please disable it and reload the page to access the decompiled content.
We only display one small text ad to keep this service free. Here's what it looks like:
Read the Docs for Business: You write the docs. We do the rest.
Try it today!Ad by EthicalAds
Download file