MD5 校验值:13e9f681f5bed77188ac69741746def0
fp0.java 文件包含反编译后的源代码,请注意,该内容仅供学习和参考使用,不得用于非法用途。
package libs; import java.io.IOException; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import java.util.StringTokenizer; public final class fp0 implements jp0, Runnable { public final Thread M1; public final hp0 N1; public final ServerSocket X; public Socket Y; public IOException Z; public fp0(hp0 hp0Var) { int i; int i2; boolean z; boolean z2; this.N1 = hp0Var; this.X = null; String property = System.getProperty("mix.activeDataTransfer.portRange"); boolean z3 = false; if (property != null) { StringTokenizer stringTokenizer = new StringTokenizer(property, "-"); if (stringTokenizer.countTokens() == 2) { String nextToken = stringTokenizer.nextToken(); String nextToken2 = stringTokenizer.nextToken(); try { i2 = Integer.parseInt(nextToken); } catch (NumberFormatException unused) { i2 = 0; } try { i = Integer.parseInt(nextToken2); } catch (NumberFormatException unused2) { i = 0; } if (i2 > 0 && i > 0 && i >= i2) { z2 = true; z = true; if (!z2) { System.err.println("WARNING: invalid value \"" + property + "\" for the mix.activeDataTransfer.portRange system property. The value should be in the start-stop form, with start > 0, stop > 0 and start <= stop."); } } } i = 0; i2 = 0; z2 = false; z = false; if (!z2) { } } else { i = 0; i2 = 0; z = false; } if (z) { ArrayList arrayList = new ArrayList(); while (i2 <= i) { arrayList.add(Integer.valueOf(i2)); i2++; } while (!z3) { int size = arrayList.size(); if (size <= 0) { break; } double random = Math.random(); double d = size; Double.isNaN(d); int intValue = ((Integer) arrayList.remove((int) Math.floor(random * d))).intValue(); try { z90.t(); ServerSocket serverSocket = new ServerSocket(); this.X = serverSocket; serverSocket.setReceiveBufferSize(524288); serverSocket.bind(new InetSocketAddress(intValue)); z3 = true; } catch (IOException unused3) { } } if (!z3) { throw new kp0(u41.w("Cannot open the ServerSocket. No available port found in range ", property)); } } else { try { z90.t(); ServerSocket serverSocket2 = new ServerSocket(); this.X = serverSocket2; serverSocket2.setReceiveBufferSize(524288); serverSocket2.bind(new InetSocketAddress(0)); } catch (IOException e) { throw new kp0("Cannot open the ServerSocket", e); } } Thread thread = new Thread(this); this.M1 = thread; thread.start(); } @Override public final void a() { ServerSocket serverSocket = this.X; if (serverSocket != null) { try { serverSocket.close(); } catch (IOException unused) { } } } @Override public final Socket b() { if (this.Y == null && this.Z == null) { try { this.M1.join(); } catch (Exception unused) { } } if (this.Z == null) { Socket socket = this.Y; if (socket != null) { hp0 hp0Var = this.N1; if (hp0Var.v) { try { return hp0Var.C(socket, socket.getInetAddress().getHostName(), socket.getPort()); } catch (IOException e) { try { socket.close(); } catch (Throwable unused2) { } throw new kp0(e); } } return socket; } throw new kp0("No socket available"); } throw new kp0("Cannot receive the incoming connection", this.Z); } @Override public final void run() { int i; boolean z; ServerSocket serverSocket = this.X; String property = System.getProperty("mix.activeDataTransfer.acceptTimeout"); int i2 = 30; if (property != null) { try { i = Integer.parseInt(property); } catch (NumberFormatException unused) { i = -1; } if (i >= 0) { z = true; } else { z = false; i = 30; } if (!z) { System.err.println("WARNING: invalid value \"" + property + "\" for the mix.activeDataTransfer.acceptTimeout system property. The value should be an integer greater or equal to 0."); } i2 = i; } try { try { serverSocket.setSoTimeout(i2 * 1000); Socket accept = serverSocket.accept(); this.Y = accept; accept.setSendBufferSize(524288); } catch (Throwable th) { try { serverSocket.close(); } catch (IOException unused2) { } throw th; } } catch (IOException e) { this.Z = e; } try { serverSocket.close(); } catch (IOException unused3) { } } }