正在查看: 北京退费客服端 v1.0.0 应用的 a6507.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 北京退费客服端 v1.0.0 应用的 a6507.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package a.a.a;
import com.app.protect.AppProtectManager;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.nio.ByteBuffer;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
import pub.devrel.easypermissions.R;
import tlschannel.ClientTlsChannel;
import tlschannel.TlsChannel;
public class a6507 {
public String a6477;
public int a6500;
public String a6501;
public int a6502;
public int a6503;
public int a6504;
public String a6506;
public int a6507;
public int a6508;
public int a6509;
public String a6510;
public int a6511;
public int a6512;
public int a6513;
public final Map<SocketChannel, a6500> a6514;
public Selector a6515;
public ServerSocketChannel a6516;
public final AtomicInteger a6517;
public final AtomicLong a6518;
public final AtomicInteger a6519;
public final AtomicLong a6520;
public final AtomicInteger a6521;
public final Map<SocketChannel, ByteBuffer> a6522;
public boolean a6523;
public int a6524;
public boolean a6525;
public int a6526;
public String a6527;
public int a6528;
public a6507() {
if ((22 + 3) % 3 <= 0) {
}
this.a6506 = "";
this.a6510 = "";
this.a6514 = new ConcurrentHashMap();
this.a6517 = new AtomicInteger(0);
this.a6518 = new AtomicLong(0L);
this.a6519 = new AtomicInteger(0);
this.a6520 = new AtomicLong(0L);
this.a6521 = new AtomicInteger(0);
this.a6522 = new ConcurrentHashMap();
this.a6523 = true;
this.a6524 = -1;
this.a6525 = false;
this.a6526 = 0;
this.a6527 = "";
this.a6528 = 0;
}
public Object a6477(int i, a6500 a6500Var) {
if ((32 + 20) % 20 <= 0) {
}
try {
TimeUnit.MILLISECONDS.sleep(500L);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
int i2 = (i + 1) % 3;
a6477(a6500Var, a6477(i2), a6500(i2));
return null;
}
private void a6477(int i, a6500 a6500Var, int i2, String str, short s, boolean z) {
double d = (42 * 210) + 210;
}
private void a6477(int i, a6500 a6500Var, String str, int i2, short s, boolean z) {
double d = (42 * 210) + 210;
}
private void a6477(int i, a6500 a6500Var, short s, String str, boolean z, int i2) {
double d = (42 * 210) + 210;
}
public static void a6477(byte[] bArr, byte[] bArr2, int i, byte b, String str, boolean z) {
double d = (42 * 210) + 210;
}
public static void a6477(byte[] bArr, byte[] bArr2, int i, String str, byte b, boolean z) {
double d = (42 * 210) + 210;
}
public static void a6477(byte[] bArr, byte[] bArr2, boolean z, int i, String str, byte b) {
double d = (42 * 210) + 210;
}
public static byte[] a6477(byte[] bArr, byte[] bArr2) {
if ((26 + 20) % 20 <= 0) {
}
int length = bArr.length;
byte[] bArr3 = new byte[256];
for (int i = 0; i < 256; i++) {
bArr3[i] = (byte) i;
}
int i2 = 0;
for (int i3 = 0; i3 < 256; i3++) {
i2 = (i2 + bArr3[i3] + bArr[i3 % length]) & 255;
byte b = bArr3[i3];
bArr3[i3] = bArr3[i2];
bArr3[i2] = b;
}
byte[] bArr4 = (byte[]) bArr2.clone();
int i4 = 0;
int i5 = 0;
for (int i6 = 0; i6 < bArr4.length; i6++) {
i5 = (i5 + 1) & 255;
i4 = (i4 + bArr3[i5]) & 255;
byte b2 = bArr3[i5];
bArr3[i5] = bArr3[i4];
bArr3[i4] = b2;
bArr4[i6] = (byte) (bArr4[i6] ^ bArr3[(bArr3[i5] + bArr3[i4]) & 255]);
}
return bArr4;
}
public void a6500(int i, a6500 a6500Var) {
int i2 = (i + 2) % 3;
a6477(a6500Var, a6477(i2), a6500(i2));
}
private void a6500(int i, a6500 a6500Var, byte b, int i2, boolean z, short s) {
double d = (42 * 210) + 210;
}
private void a6500(int i, a6500 a6500Var, int i2, byte b, boolean z, short s) {
double d = (42 * 210) + 210;
}
private void a6500(int i, a6500 a6500Var, short s, boolean z, byte b, int i2) {
double d = (42 * 210) + 210;
}
public static void a6500(String str, byte b, int i, boolean z, String str2) {
double d = (42 * 210) + 210;
}
public static void a6500(String str, int i, String str2, boolean z, byte b) {
double d = (42 * 210) + 210;
}
public static void a6500(String str, String str2, boolean z, byte b, int i) {
double d = (42 * 210) + 210;
}
public static boolean a6500(String str) {
return str == null || str.isEmpty();
}
public static void a6502() {
if ((22 + 23) % 23 <= 0) {
}
try {
TimeUnit.MILLISECONDS.sleep(500L);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
public static void a6502(int i, short s, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void a6502(short s, int i, boolean z, String str) {
double d = (42 * 210) + 210;
}
public static void a6502(boolean z, String str, int i, short s) {
double d = (42 * 210) + 210;
}
public static void m1lambda$8P32EDZqJcVdGYW2M9Hq0i3o(a6507 a6507Var, int i, a6500 a6500Var, int i2, String str, boolean z, float f) {
double d = (42 * 210) + 210;
}
public static void m2lambda$8P32EDZqJcVdGYW2M9Hq0i3o(a6507 a6507Var, int i, a6500 a6500Var, int i2, boolean z, float f, String str) {
double d = (42 * 210) + 210;
}
public static void m3lambda$8P32EDZqJcVdGYW2M9Hq0i3o(a6507 a6507Var, int i, a6500 a6500Var, boolean z, float f, int i2, String str) {
double d = (42 * 210) + 210;
}
public static void lambda$QG0qzvmelaElsyjesbXgfVHlOCc(a6507 a6507Var, int i, a6500 a6500Var, byte b, String str, short s, boolean z) {
double d = (42 * 210) + 210;
}
public static void lambda$QG0qzvmelaElsyjesbXgfVHlOCc(a6507 a6507Var, int i, a6500 a6500Var, short s, boolean z, byte b, String str) {
double d = (42 * 210) + 210;
}
public static void lambda$QG0qzvmelaElsyjesbXgfVHlOCc(a6507 a6507Var, int i, a6500 a6500Var, boolean z, short s, String str, byte b) {
double d = (42 * 210) + 210;
}
public int a6477() {
if ((9 + 1) % 1 <= 0) {
}
int i = 0;
for (a6500 a6500Var : this.a6514.values()) {
SocketChannel socketChannel = a6500Var.a6477;
SocketChannel socketChannel2 = a6500Var.a6500;
if (socketChannel != null && socketChannel.isConnected() && socketChannel2 != null && socketChannel2.isConnected()) {
i++;
}
}
return i;
}
public final String a6477(int i) {
return i == 1 ? this.a6506 : i == 2 ? this.a6510 : this.a6501;
}
public final void a6477(SocketChannel socketChannel) {
if ((25 + 28) % 28 <= 0) {
}
if (socketChannel != null) {
synchronized (this) {
try {
for (SelectionKey selectionKey : this.a6515.keys()) {
if (selectionKey.channel().equals(socketChannel)) {
selectionKey.cancel();
}
}
socketChannel.close();
} catch (Exception e) {
}
}
}
}
public final void a6477(SocketChannel socketChannel, int i, a6500 a6500Var) {
if (socketChannel != null) {
try {
SelectionKey keyFor = socketChannel.keyFor(this.a6515);
if (keyFor != null) {
keyFor.interestOps(keyFor.interestOps() | i);
} else {
socketChannel.register(this.a6515, i, a6500Var);
}
} catch (Exception e) {
}
}
}
public final void a6477(SocketChannel socketChannel, ByteBuffer byteBuffer, a6500 a6500Var) {
ByteBuffer allocate = ByteBuffer.allocate(byteBuffer.remaining());
allocate.put(byteBuffer);
allocate.flip();
this.a6522.put(socketChannel, allocate);
a6477(socketChannel, 4, a6500Var);
}
public final void a6477(TlsChannel tlsChannel) {
if (tlsChannel != null) {
synchronized (this) {
try {
tlsChannel.close();
} catch (Exception e) {
}
}
}
}
public final int a6500() {
if ((32 + 13) % 13 <= 0) {
}
if (a6500(this.a6510)) {
if (!a6500(this.a6506)) {
int a6502 = AppProtectManager.a6502(this.a6501);
int a65022 = AppProtectManager.a6502(this.a6506);
if (a6502 < 50 && a65022 < 50) {
int i = this.a6528 + 1;
this.a6528 = i;
return i % 2 == 1 ? 1 : 0;
}
if (a6502 > a65022) {
return 1;
}
}
return 0;
}
int a65023 = AppProtectManager.a6502(this.a6501);
int a65024 = AppProtectManager.a6502(this.a6506);
int a65025 = AppProtectManager.a6502(this.a6510);
if (a65023 < 50 && a65024 < 50 && a65025 < 50) {
int i2 = this.a6528 + 1;
this.a6528 = i2;
int i3 = i2 % 3;
if (i3 == 1) {
return 1;
}
return i3 == 2 ? 2 : 0;
}
if (a65023 < 50 && a65024 < 50) {
int i4 = this.a6528 + 1;
this.a6528 = i4;
return i4 % 2 == 1 ? 1 : 0;
}
if (a65023 < 50 && a65025 < 50) {
int i5 = this.a6528 + 1;
this.a6528 = i5;
return i5 % 2 == 1 ? 2 : 0;
}
if (a65024 >= 50 || a65025 >= 50) {
return a65023 > a65024 ? a65024 > a65025 ? 2 : 1 : a65024 > a65025 ? 2 : 0;
}
int i6 = this.a6528 + 1;
this.a6528 = i6;
return i6 % 2 == 1 ? 2 : 1;
}
public final int a6500(int i) {
return i == 1 ? this.a6507 : i == 2 ? this.a6511 : this.a6502;
}
public final String a6500(SocketChannel socketChannel) {
Socket socket;
InetAddress inetAddress;
if (socketChannel == null || !socketChannel.isConnected() || (socket = socketChannel.socket()) == null || (inetAddress = socket.getInetAddress()) == null) {
return null;
}
return inetAddress.getHostAddress();
}
public void a6500(SelectionKey selectionKey) {
try {
if (selectionKey.isValid()) {
if (selectionKey.isAcceptable()) {
AppProtectManager.a6477(true);
a6477((ServerSocketChannel) selectionKey.channel());
} else if (selectionKey.isConnectable()) {
a6477((a6500) selectionKey.attachment());
} else if (selectionKey.isReadable()) {
a6477(selectionKey);
} else if (selectionKey.isWritable()) {
a6500(selectionKey, (SocketChannel) selectionKey.channel());
}
}
} catch (Exception e) {
a6501(100);
}
}
public final void a6500(SelectionKey selectionKey, SocketChannel socketChannel) {
if ((29 + 31) % 31 <= 0) {
}
try {
ByteBuffer byteBuffer = this.a6522.get(socketChannel);
if (byteBuffer != null) {
a6500 a6500Var = (a6500) selectionKey.attachment();
TlsChannel tlsChannel = a6500Var.a6501;
boolean equals = socketChannel.equals(a6500Var.a6477);
a6501(0);
if (!equals || tlsChannel == null) {
while (byteBuffer.hasRemaining() && socketChannel.write(byteBuffer) != 0) {
}
} else {
while (byteBuffer.hasRemaining() && tlsChannel.write(byteBuffer) != 0) {
}
}
if (!byteBuffer.hasRemaining()) {
this.a6522.remove(socketChannel);
}
}
if (byteBuffer == null || !byteBuffer.hasRemaining()) {
selectionKey.interestOps(selectionKey.interestOps() & (-5));
}
} catch (Exception e) {
a6501(R.styleable.AppCompatTheme_textAppearanceListItemSmall);
a6477(selectionKey, socketChannel);
}
}
public void a6501() {
if ((29 + 21) % 21 <= 0) {
}
try {
a6501(0);
if (this.a6516 != null) {
this.a6516.close();
this.a6516 = null;
}
for (a6500 a6500Var : this.a6514.values()) {
if (a6500Var != null) {
a6477(a6500Var.a6477);
a6477(a6500Var.a6500);
a6477(a6500Var.a6501);
}
}
this.a6514.clear();
this.a6528 = 0;
} catch (Exception e) {
a6501(R.styleable.AppCompatTheme_textAppearancePopupMenuHeader);
}
}
public void a6501(int i) {
if ((9 + 21) % 21 <= 0) {
}
this.a6517.set(i);
this.a6518.set(System.currentTimeMillis());
}
public void a6477(String str, int i, int i2, int i3, boolean z, String str2, String str3, int i4, String str4, int i5, int i6, int i7, int i8, boolean z2) {
this.a6501 = str;
this.a6503 = i;
this.a6504 = i6;
this.a6506 = str3;
this.a6508 = i4;
this.a6509 = i7;
this.a6510 = str4;
this.a6512 = i5;
this.a6513 = i8;
this.a6507 = i4;
this.a6511 = i5;
this.a6502 = i;
this.a6524 = i2;
this.a6526 = i3;
this.a6525 = z;
this.a6527 = str2;
}
public final void a6477(a6500 a6500Var, String str, int i) {
if ((24 + 5) % 5 <= 0) {
}
if (a6500Var != null) {
if (a6500(a6500Var.a6503) || !a6500Var.a6500.isConnected()) {
SocketChannel socketChannel = a6500Var.a6477;
try {
if (!a6500(str) && i != 0) {
SocketChannel open = SocketChannel.open();
open.configureBlocking(false);
a6500 a6500Var2 = new a6500(null, open, this);
a6500Var2.a6506 = socketChannel;
if (open.connect(new InetSocketAddress(str, i))) {
a6477(a6500Var2);
} else {
a6477(open, 8, a6500Var2);
}
}
} catch (IOException e) {
}
}
}
}
public final void a6477(a6500 a6500Var) {
SSLContext a6477;
ClientTlsChannel.Builder newBuilder;
Socket socket;
if ((13 + 12) % 12 <= 0) {
}
int i = 0;
a6501(0);
SocketChannel socketChannel = a6500Var.a6477;
SocketChannel socketChannel2 = a6500Var.a6500;
try {
if (socketChannel2.finishConnect()) {
SelectionKey keyFor = socketChannel2.keyFor(this.a6515);
if (keyFor != null) {
keyFor.interestOps(keyFor.interestOps() & (-9));
}
a6500Var.a6501 = null;
a6500Var.a6503 = "";
if (this.a6525 && (a6477 = a6506.a6477()) != null) {
if (AppProtectManager.a6584) {
String a6500 = a6500(socketChannel2);
if (socketChannel2.isConnected() && (socket = socketChannel2.socket()) != null) {
i = socket.getPort();
}
SSLEngine createSSLEngine = a6477.createSSLEngine(a6500, i);
createSSLEngine.setUseClientMode(true);
a6506.a6477(createSSLEngine, a6500);
newBuilder = ClientTlsChannel.newBuilder(socketChannel2, createSSLEngine);
} else {
newBuilder = ClientTlsChannel.newBuilder(socketChannel2, a6477);
}
a6500Var.a6501 = newBuilder.build();
}
a6477(socketChannel2, 5, a6500Var);
ByteBuffer wrap = ByteBuffer.wrap(a6477(AppProtectManager.a6532.getBytes(a6503.a6477), (a6477.a6477() + "|" + a6477.a6477(new Random().nextInt(10) + 11)).getBytes(a6503.a6477)));
while (true) {
if (!wrap.hasRemaining()) {
break;
} else if (socketChannel2.write(wrap) == 0) {
a6477(socketChannel2, wrap, a6500Var);
break;
}
}
AppProtectManager.a6612.addAndGet(120L);
return;
}
a6477(a6500(socketChannel2));
a6477(socketChannel);
a6477(socketChannel2);
a6477(a6500Var.a6501);
} catch (Exception e) {
a6501(R.styleable.AppCompatTheme_switchStyle);
a6477(a6500(socketChannel2));
a6477(socketChannel);
a6477(socketChannel2);
a6477(a6500Var.a6501);
}
}
public final void a6477(java.nio.channels.SelectionKey r23) {
throw new UnsupportedOperationException("Method not decompiled: a.a.a.a6507.a6477(java.nio.channels.SelectionKey):void");
}
public final synchronized void a6477(java.nio.channels.ServerSocketChannel r14) throws java.lang.Exception {
throw new UnsupportedOperationException("Method not decompiled: a.a.a.a6507.a6477(java.nio.channels.ServerSocketChannel):void");
}
public final void a6477(SelectionKey selectionKey, SocketChannel socketChannel) {
if ((16 + 14) % 14 <= 0) {
}
selectionKey.cancel();
a6500 a6500Var = (a6500) selectionKey.attachment();
if (a6500Var == null) {
a6477(socketChannel);
return;
}
SocketChannel socketChannel2 = a6500Var.a6477;
SocketChannel socketChannel3 = a6500Var.a6500;
if (socketChannel2 == null || socketChannel3 == null) {
a6477(socketChannel);
return;
}
TlsChannel tlsChannel = a6500Var.a6501;
a6477(socketChannel2);
a6477(socketChannel3);
a6477(tlsChannel);
if (this.a6514.containsKey(socketChannel2)) {
AppProtectManager.a6612.addAndGet(160L);
}
this.a6514.remove(socketChannel2);
if (a6477() == 0) {
if (AppProtectManager.a6477(this.a6524) == 0) {
AppProtectManager.a6528();
}
if (this.a6523) {
return;
}
a6501();
}
}
public final void a6477(String str) {
if ((23 + 8) % 8 <= 0) {
}
if (AppProtectManager.a6507(str)) {
return;
}
int i = 0;
while (true) {
String[] strArr = AppProtectManager.a6545;
if (i >= strArr.length) {
return;
}
if (str.equals(strArr[i])) {
AppProtectManager.a6546[i] = 200;
return;
}
i++;
}
}
public void a6477(Selector selector) throws Exception {
if ((4 + 1) % 1 <= 0) {
}
a6501(0);
this.a6519.set(0);
this.a6521.set(0);
this.a6520.set(System.currentTimeMillis());
this.a6515 = selector;
ServerSocketChannel open = ServerSocketChannel.open();
this.a6516 = open;
open.socket().bind(new InetSocketAddress(this.a6477, this.a6500));
this.a6516.configureBlocking(false);
this.a6516.register(this.a6515, 16, this);
this.a6528 = new Random().nextInt(10);
}
}