正在查看: MT Manager v2.13.3 应用的 RunnableC4234.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: MT Manager v2.13.3 应用的 RunnableC4234.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package l;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
public final class RunnableC4234 implements Runnable, ۨ۫ۙۗ {
public static final InterfaceC7831 f15170 = ۫ۚۛۨ.ۗ(RunnableC4234.class);
public ArrayList f15171;
public int f15172;
public HashMap f15173;
public InetAddress f15174;
public C8410 f15175;
public byte[] f15176;
public int f15177;
public ۨۨۚۗ f15178;
public InetAddress f15179;
public ۨۨۚۗ f15180;
public int f15181;
public byte[] f15182;
public final Object f15183;
public Thread f15184;
public int f15185;
public ۧۗۚۗ f15186;
public final HashSet f15187;
public DatagramPacket f15188;
public DatagramPacket f15189;
public final HashMap f15190;
public ۫ۤۙۗ f15191;
public DatagramSocket f15192;
public RunnableC4234(۫ۤۙۗ r13) {
InetAddress byName;
r13.ۖ().getClass();
r13.ۖ().getClass();
this.f15183 = new Object();
this.f15177 = 0;
HashMap hashMap = new HashMap();
this.f15190 = hashMap;
this.f15187 = new HashSet();
this.f15173 = new HashMap();
this.f15172 = 0;
this.f15171 = new ArrayList();
this.f15175 = new C8410();
this.f15181 = 0;
this.f15174 = null;
this.f15191 = r13;
this.f15179 = ((C3414) r13.ۖ()).m8802();
this.f15182 = new byte[((C3414) r13.ۖ()).m8794()];
this.f15176 = new byte[((C3414) r13.ۖ()).m8772()];
this.f15189 = new DatagramPacket(this.f15182, ((C3414) r13.ۖ()).m8794(), this.f15179, InterfaceC1507.f4221);
this.f15188 = new DatagramPacket(this.f15176, ((C3414) r13.ۖ()).m8772());
this.f15171 = ((C3414) r13.ۖ()).m8775();
ۧۗۚۗ r3 = new ۧۗۚۗ(r13.ۖ(), "0.0.0.0", 0, (String) null);
this.f15186 = r3;
ۨۨۚۗ r4 = new ۨۨۚۗ(r3, 0);
this.f15180 = r4;
hashMap.put(r3, new C2844(r4, -1L));
r13.ۖ().getClass();
try {
try {
byName = InetAddress.getLocalHost();
} catch (UnknownHostException unused) {
byName = InetAddress.getByName("127.0.0.1");
}
r13.ۖ().getClass();
byte[] address = byName.getAddress();
String str = "JCIFS" + (address[2] & 255) + "_" + (address[3] & 255) + "_" + C2494.m6628((int) (Math.random() * 255.0d), 2);
ۦۤۙۗ r5 = r13.ۖ();
r13.ۖ().getClass();
ۧۗۚۗ r42 = new ۧۗۚۗ(r5, str, 0, (String) null);
ۨۨۚۗ r132 = new ۨۨۚۗ(r42, byName.hashCode(), 0);
this.f15178 = r132;
m10515(r42, r132, -1L);
} catch (UnknownHostException e) {
throw new C2026(e);
}
}
public final ۨۨۚۗ m10509(ۧۗۚۗ r6) {
ۨۨۚۗ r0;
ۨۨۚۗ r2 = null;
InetAddress inetAddress = r6.ۨ == 29 ? this.f15179 : null;
r6.ۘ = inetAddress != null ? inetAddress.hashCode() : 0;
ۨۨۚۗ m10524 = m10524(r6);
if (m10524 == null) {
synchronized (this.f15187) {
if (!this.f15187.contains(r6)) {
this.f15187.add(r6);
} else {
while (this.f15187.contains(r6)) {
try {
this.f15187.wait();
} catch (InterruptedException e) {
f15170.mo12494("Interrupted", e);
}
}
r2 = m10524(r6);
if (r2 == null) {
synchronized (this.f15187) {
this.f15187.add(r6);
}
}
}
}
try {
if (r2 == null) {
try {
r0 = m10510(r6, inetAddress);
} catch (UnknownHostException unused) {
r0 = this.f15180;
}
m10524 = r0;
m10514(r6, m10524);
m10505(r6);
} else {
m10524 = r2;
}
} catch (Throwable th) {
m10514(r6, r2);
m10505(r6);
throw th;
}
}
if (m10524 != this.f15180) {
return m10524;
}
throw new UnknownHostException(r6.toString());
}
private void m10505(ۧۗۚۗ r3) {
synchronized (this.f15187) {
this.f15187.remove(r3);
this.f15187.notifyAll();
}
}
public final void m10514(ۧۗۚۗ r5, ۨۨۚۗ r6) {
if (((C3414) this.f15191.ۖ()).m8765() == 0) {
return;
}
m10515(r5, r6, ((C3414) this.f15191.ۖ()).m8765() != -1 ? System.currentTimeMillis() + (((C3414) this.f15191.ۖ()).m8765() * 1000) : -1L);
}
public final void m10515(ۧۗۚۗ r3, ۨۨۚۗ r4, long j) {
if (((C3414) this.f15191.ۖ()).m8765() == 0) {
return;
}
synchronized (this.f15190) {
C2844 c2844 = (C2844) this.f15190.get(r3);
if (c2844 == null) {
this.f15190.put(r3, new C2844(r4, j));
} else {
c2844.f9097 = r4;
c2844.f9098 = j;
}
}
}
public final void m10516(ۨۨۚۗ[] r8) {
if (((C3414) this.f15191.ۖ()).m8765() == 0) {
return;
}
long currentTimeMillis = ((C3414) this.f15191.ۖ()).m8765() != -1 ? System.currentTimeMillis() + (((C3414) this.f15191.ۖ()).m8765() * 1000) : -1L;
synchronized (this.f15190) {
for (int i = 0; i < r8.length; i++) {
C2844 c2844 = (C2844) this.f15190.get(r8[i].ۛ);
if (c2844 == null) {
ۨۨۚۗ r5 = r8[i];
this.f15190.put(r5.ۛ, new C2844(r5, currentTimeMillis));
} else {
c2844.f9097 = r8[i];
c2844.f9098 = currentTimeMillis;
}
}
}
}
public final ۨۨۚۗ m10524(ۧۗۚۗ r8) {
ۨۨۚۗ r1;
if (((C3414) this.f15191.ۖ()).m8765() == 0) {
return null;
}
synchronized (this.f15190) {
C2844 c2844 = (C2844) this.f15190.get(r8);
if (c2844 != null && c2844.f9098 < System.currentTimeMillis() && c2844.f9098 >= 0) {
c2844 = null;
}
r1 = c2844 != null ? c2844.f9097 : null;
}
return r1;
}
public final void m10512(int i) {
this.f15185 = 0;
if (((C3414) this.f15191.ۖ()).m8806() != 0) {
this.f15185 = Math.max(((C3414) this.f15191.ۖ()).m8806(), i);
}
if (this.f15192 == null) {
this.f15192 = new DatagramSocket(this.f15181, this.f15174);
Thread thread = new Thread(this, "JCIFS-NameServiceClient");
this.f15184 = thread;
thread.setDaemon(true);
this.f15184.start();
}
}
public final void m10506() {
synchronized (this.f15183) {
DatagramSocket datagramSocket = this.f15192;
if (datagramSocket != null) {
datagramSocket.close();
this.f15192 = null;
}
this.f15184 = null;
this.f15173.clear();
}
}
@Override
public final void run() {
while (this.f15184 == Thread.currentThread()) {
try {
try {
try {
this.f15188.setLength(((C3414) this.f15191.ۖ()).m8772());
this.f15192.setSoTimeout(this.f15185);
this.f15192.receive(this.f15188);
InterfaceC7831 interfaceC7831 = f15170;
interfaceC7831.mo12505("NetBIOS: new data read from socket");
AbstractC1294 abstractC1294 = (AbstractC1294) this.f15173.get(new Integer(AbstractC1294.m3758(0, this.f15176)));
if (abstractC1294 != null && !abstractC1294.f3624) {
synchronized (abstractC1294) {
abstractC1294.m3760(this.f15176);
abstractC1294.f3624 = true;
if (interfaceC7831.mo12511()) {
interfaceC7831.mo12505(abstractC1294.toString());
interfaceC7831.mo12505(C2494.m6630(this.f15176, 0, this.f15188.getLength()));
}
abstractC1294.notify();
}
}
} catch (SocketTimeoutException e) {
f15170.mo12494("Socket timeout", e);
}
} catch (Exception e2) {
f15170.mo12499("Uncaught exception in NameServiceClient", (Throwable) e2);
}
} finally {
m10506();
}
}
}
public final void m10513(l.AbstractC1294 r13, l.AbstractC1294 r14, int r15) {
throw new UnsupportedOperationException("Method not decompiled: l.RunnableC4234.m10513(l.ۗۨۚۗ, l.ۗۨۚۗ, int):void");
}
public final l.ۨۨۚۗ m10510(l.ۧۗۚۗ r12, java.net.InetAddress r13) {
throw new UnsupportedOperationException("Method not decompiled: l.RunnableC4234.m10510(l.ۧۗۚۗ, java.net.InetAddress):l.ۨۨۚۗ");
}
public final ۨۨۚۗ[] m10520(InterfaceC4115 interfaceC4115) {
C1991 c1991 = new C1991(this.f15191.ۖ(), interfaceC4115.m19659(ۨۨۚۗ.class));
int i = 0;
AbstractC1294 c0588 = new C0588(this.f15191.ۖ(), new ۧۗۚۗ(this.f15191.ۖ(), "*\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", 0, (String) null));
c0588.f3636 = interfaceC4115.m19661();
int m8791 = ((C3414) this.f15191.ۖ()).m8791();
while (true) {
int i2 = m8791 - 1;
if (m8791 > 0) {
try {
m10513(c0588, c1991, ((C3414) this.f15191.ۖ()).m8809());
if (c1991.f3624 && c1991.f3640 == 0) {
int hashCode = c0588.f3636.hashCode();
while (true) {
ۨۨۚۗ[] r1 = c1991.f6157;
if (i >= r1.length) {
return r1;
}
r1[i].ۛ.ۘ = hashCode;
i++;
}
} else {
m8791 = i2;
}
} catch (IOException e) {
f15170.mo12515("Failed to send node status request for " + interfaceC4115, e);
throw new UnknownHostException(interfaceC4115.toString());
}
} else {
throw new UnknownHostException(interfaceC4115.m19660());
}
}
}
public final ۨۨۚۗ m10508(int i, String str) {
if (str != null && str.length() != 0) {
ۧۗۚۗ r0 = new ۧۗۚۗ(this.f15191.ۖ(), str, i, (String) null);
if (!Character.isDigit(str.charAt(0))) {
return m10509(r0);
}
char[] charArray = str.toCharArray();
int i2 = 0;
int i3 = 0;
int i4 = 0;
while (i2 < charArray.length) {
char c = charArray[i2];
if (c < '0' || c > '9') {
return m10509(r0);
}
int i5 = 0;
while (c != '.') {
if (c < '0' || c > '9') {
return m10509(r0);
}
i5 = ((i5 * 10) + c) - 48;
i2++;
if (i2 >= charArray.length) {
break;
}
c = charArray[i2];
}
if (i5 > 255) {
return m10509(r0);
}
i4 = (i4 << 8) + i5;
i3++;
i2++;
}
if (i3 != 4 || str.endsWith(".")) {
return m10509(r0);
}
return new ۨۨۚۗ(this.f15186, i4);
}
return this.f15178;
}
public final l.ۨۨۚۗ[] m10519(java.lang.String r8, int r9, java.lang.String r10, java.net.InetAddress r11) {
throw new UnsupportedOperationException("Method not decompiled: l.RunnableC4234.m10519(java.lang.String, int, java.lang.String, java.net.InetAddress):l.ۨۨۚۗ[]");
}
public final InterfaceC4115[] m10525(String str) {
String str2;
ۨۨۚۗ m10508 = m10508(0, str);
try {
ۨۨۚۗ[] m10520 = m10520((InterfaceC4115) m10508);
m10516(m10520);
return m10520;
} catch (UnknownHostException unused) {
StringBuilder sb = new StringBuilder("no name with type 0x");
sb.append(C2494.m6628(m10508.ۛ.ۨ, 2));
String str3 = m10508.ۛ.ۖ;
if (str3 == null || str3.isEmpty()) {
str2 = " with no scope";
} else {
str2 = " with scope " + m10508.ۛ.ۖ;
}
sb.append(str2);
sb.append(" for host ");
sb.append(m10508.ۖ());
throw new UnknownHostException(sb.toString());
}
}
public final InetAddress m10523() {
if (((C3414) this.f15191.ۖ()).m8766().length == 0) {
return null;
}
return ((C3414) this.f15191.ۖ()).m8766()[this.f15177];
}
public final boolean m10517(InetAddress inetAddress) {
for (int i = 0; inetAddress != null && i < ((C3414) this.f15191.ۖ()).m8766().length; i++) {
if (inetAddress.hashCode() == ((C3414) this.f15191.ۖ()).m8766()[i].hashCode()) {
return true;
}
}
return false;
}
public final void m10522() {
this.f15177 = this.f15177 + 1 < ((C3414) this.f15191.ۖ()).m8766().length ? this.f15177 + 1 : 0;
if (((C3414) this.f15191.ۖ()).m8766().length == 0) {
return;
}
InetAddress inetAddress = ((C3414) this.f15191.ۖ()).m8766()[this.f15177];
}
public final InterfaceC4115[] m10518(String str, InetAddress inetAddress) {
ۡۗۚۗ r6 = new ۡۗۚۗ();
C4928 c4928 = new C4928(r6, str, m10517(inetAddress) ? 27 : 29, inetAddress, this.f15191);
C4928 c49282 = new C4928(r6, str, 32, inetAddress, this.f15191);
c4928.setDaemon(true);
c49282.setDaemon(true);
try {
synchronized (r6) {
c4928.start();
c49282.start();
while (r6.ۗ > 0 && c4928.m12255() == null && c49282.m12255() == null) {
r6.wait();
}
}
try {
c4928.interrupt();
} catch (SecurityException unused) {
}
try {
c4928.join();
} catch (InterruptedException unused2) {
}
try {
c49282.interrupt();
} catch (SecurityException unused3) {
}
try {
c49282.join();
} catch (InterruptedException unused4) {
}
if (c4928.m12255() != null) {
return c4928.m12255();
}
if (c49282.m12255() != null) {
return c49282.m12255();
}
throw c4928.m12256();
} catch (InterruptedException unused5) {
throw new UnknownHostException(str);
}
}
public final ۬ۨۚۗ m10511(String str) {
return m10521(str, false)[0];
}
public final ۬ۨۚۗ[] m10521(String str, boolean z) {
int ordinal;
boolean z2;
InterfaceC4115[] m10518;
if (str == null || str.length() == 0) {
throw new UnknownHostException();
}
if (۬ۨۚۗ.ۗ(str)) {
return new ۬ۨۚۗ[]{new ۬ۨۚۗ(m10508(0, str))};
}
InterfaceC7831 interfaceC7831 = f15170;
if (interfaceC7831.mo12511()) {
interfaceC7831.mo12505("Resolver order is " + ((C3414) this.f15191.ۖ()).m8775());
}
Iterator it = ((C3414) this.f15191.ۖ()).m8775().iterator();
while (it.hasNext()) {
EnumC0624 enumC0624 = (EnumC0624) it.next();
try {
ordinal = enumC0624.ordinal();
} catch (IOException e) {
InterfaceC7831 interfaceC78312 = f15170;
interfaceC78312.mo12516("Resolving {} via {} failed:", str, enumC0624);
interfaceC78312.mo12494("Exception is", e);
}
if (ordinal != 0) {
if (ordinal != 1) {
if (ordinal == 2) {
int i = 0;
while (true) {
if (i >= str.length()) {
z2 = true;
break;
}
if (!Character.isDigit(str.charAt(i))) {
z2 = false;
break;
}
i++;
}
if (z2) {
throw new UnknownHostException(str);
}
InetAddress[] allByName = InetAddress.getAllByName(str);
۬ۨۚۗ[] r5 = new ۬ۨۚۗ[allByName.length];
for (int i2 = 0; i2 < allByName.length; i2++) {
r5[i2] = new ۬ۨۚۗ(allByName[i2]);
}
InterfaceC7831 interfaceC78313 = f15170;
if (interfaceC78313.mo12504()) {
interfaceC78313.mo12498("Resolved '{}' to {} using DNS", str, Arrays.toString(r5));
}
return r5;
}
if (ordinal != 3) {
throw new UnknownHostException(str);
}
C8410 c8410 = this.f15175;
۫ۤۙۗ r6 = this.f15191;
synchronized (c8410) {
new ۧۗۚۗ(r6.ۖ(), str, 32, (String) null);
c8410.m20372(r6);
}
} else if (str.length() <= 15) {
m10518 = z ? m10518(str, ((C3414) this.f15191.ۖ()).m8802()) : m10519(str, 32, null, ((C3414) this.f15191.ۖ()).m8802());
}
} else if (!str.equals("\u0001\u0002__MSBROWSE__\u0002") && str.length() <= 15) {
m10518 = z ? m10518(str, m10523()) : m10519(str, 32, null, m10523());
}
if (m10518 != null) {
InterfaceC7831 interfaceC78314 = f15170;
if (interfaceC78314.mo12504()) {
interfaceC78314.mo12500("Resolved '{}' to addrs {} via {}", str, Arrays.toString(m10518), enumC0624);
}
۬ۨۚۗ[] r52 = new ۬ۨۚۗ[m10518.length];
for (int i3 = 0; i3 < m10518.length; i3++) {
r52[i3] = new ۬ۨۚۗ(m10518[i3]);
}
return r52;
}
}
throw new UnknownHostException(str);
}
public final ۧۗۚۗ m10507() {
ۨۨۚۗ r0 = this.f15178;
if (r0 != null) {
return r0.ۛ;
}
return null;
}
}