蘑菇視頻 v1.3.4版本的 MD5 值为:b21956b74446eba74a6fe191899b35cf
以下内容为反编译后的 o0000O.java 源代码,内容仅作参考
package OoooooO;
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 o0000O {
private final ExecutorService f2099oo0oOO = Executors.newSingleThreadExecutor();
private final int f2100oo0oOOO;
private final String f2101oo0oOOO0;
public class oo0oOOO0 implements Callable<Boolean> {
private oo0oOOO0() {
}
@Override
public Boolean call() throws Exception {
return Boolean.valueOf(o0000O.this.oOo0oooO());
}
}
public o0000O(String str, int i) {
this.f2101oo0oOOO0 = (String) o0000OO0.oo0oOOOo(str);
this.f2100oo0oOOO = i;
}
public boolean oOo0oooO() throws o000O000 {
o0000O0 o0000o02 = new o0000O0(oo0oOOO(), null, null);
try {
byte[] bytes = "ping ok".getBytes();
o0000o02.oo0oOO(0L);
byte[] bArr = new byte[bytes.length];
o0000o02.read(bArr);
boolean equals = Arrays.equals(bytes, bArr);
o0000.oo0oOOOo("Ping response: `" + new String(bArr) + "`, pinged? " + equals);
return equals;
} catch (o000O000 e) {
o0000.oo0oOOO0("Error reading ping response", e);
return false;
} finally {
o0000o02.close();
}
}
private String oo0oOOO() {
return String.format(Locale.US, "http://%s:%d/%s", this.f2101oo0oOOO0, Integer.valueOf(this.f2100oo0oOOO), "ping");
}
private List<Proxy> oo0oOOO0() {
try {
return ProxySelector.getDefault().select(new URI(oo0oOOO()));
} catch (URISyntaxException e) {
throw new IllegalStateException(e);
}
}
public boolean oo0oOOOo(String str) {
return "ping".equals(str);
}
public boolean oo0oOOo0(int i, int i2) {
o0000OO0.oo0oOOO0(i >= 1);
o0000OO0.oo0oOOO0(i2 > 0);
int i3 = 0;
while (i3 < i) {
try {
} catch (InterruptedException e) {
e = e;
o0000.oo0oOOO0("Error pinging server due to unexpected error", e);
} catch (ExecutionException e2) {
e = e2;
o0000.oo0oOOO0("Error pinging server due to unexpected error", e);
} catch (TimeoutException unused) {
o0000.oOo0oooO("Error pinging server (attempt: " + i3 + ", timeout: " + i2 + "). ");
}
if (((Boolean) this.f2099oo0oOO.submit(new oo0oOOO0()).get(i2, TimeUnit.MILLISECONDS)).booleanValue()) {
return true;
}
i3++;
i2 *= 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(i3), Integer.valueOf(i2 / 2), oo0oOOO0());
o0000.oo0oOOO0(format, new o000O000(format));
return false;
}
public void ooOOOoOo(Socket socket) throws IOException {
OutputStream outputStream = socket.getOutputStream();
outputStream.write("HTTP/1.1 200 OK\n\n".getBytes());
outputStream.write("ping ok".getBytes());
}
}