鑫垚影视 v20.42版本的 MD5 值为:e3822d25ef47121f1770bb4806abacfe
以下内容为反编译后的 n.java 源代码,内容仅作参考
package e.e.a;
import java.io.IOException;
import java.io.OutputStream;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.Socket;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
public class n {
private static final String f12426d = "ping";
private static final String f12427e = "ping ok";
private final ExecutorService f12428a = Executors.newSingleThreadExecutor();
private final String f12429b;
private final int f12430c;
public class b implements Callable<Boolean> {
private b() {
}
@Override
public Boolean call() throws Exception {
return Boolean.valueOf(n.this.f());
}
}
public n(String str, int i2) {
this.f12429b = (String) o.d(str);
this.f12430c = i2;
}
private List<Proxy> b() {
try {
return ProxySelector.getDefault().select(new URI(c()));
} catch (URISyntaxException e2) {
throw new IllegalStateException(e2);
}
}
private String c() {
return String.format(Locale.US, "http://%s:%d/%s", this.f12429b, Integer.valueOf(this.f12430c), f12426d);
}
public boolean f() throws q {
k kVar = new k(c(), null, null);
try {
byte[] bytes = f12427e.getBytes();
kVar.a(0L);
byte[] bArr = new byte[bytes.length];
kVar.read(bArr);
boolean equals = Arrays.equals(bytes, bArr);
h.h("Ping response: `" + new String(bArr) + "`, pinged? " + equals);
return equals;
} catch (q e2) {
h.f("Error reading ping response", e2);
return false;
} finally {
kVar.close();
}
}
public boolean d(String str) {
return f12426d.equals(str);
}
public boolean e(int i2, int i3) {
o.b(i2 >= 1);
o.b(i3 > 0);
int i4 = 0;
while (i4 < i2) {
try {
} catch (InterruptedException e2) {
e = e2;
h.f("Error pinging server due to unexpected error", e);
} catch (ExecutionException e3) {
e = e3;
h.f("Error pinging server due to unexpected error", e);
} catch (TimeoutException unused) {
h.j("Error pinging server (attempt: " + i4 + ", timeout: " + i3 + "). ");
}
if (((Boolean) this.f12428a.submit(new b()).get(i3, TimeUnit.MILLISECONDS)).booleanValue()) {
return true;
}
i4++;
i3 *= 2;
}
String format = String.format(Locale.US, "Error pinging server (attempts: %d, max timeout: %d). If you see this message, please, report at https://github.com/danikula/AndroidVideoCache/issues/134. Default proxies are: %s", Integer.valueOf(i4), Integer.valueOf(i3 / 2), b());
h.f(format, new q(format));
return false;
}
public void g(Socket socket) throws IOException {
OutputStream outputStream = socket.getOutputStream();
outputStream.write("HTTP/1.1 200 OK\n\n".getBytes());
outputStream.write(f12427e.getBytes());
}
}