正在查看: 安讯通-企业级安全协同工具 v1.0.50 应用的 f1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 安讯通-企业级安全协同工具 v1.0.50 应用的 f1.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.zx.a.I8b7;
import android.net.ConnectivityManager;
import android.net.Network;
import android.text.TextUtils;
import android.util.Base64;
import com.taobao.weex.el.parse.Operators;
import com.zx.a.I8b7.o2;
import com.zx.a.I8b7.q1;
import io.dcloud.common.util.Md5Utils;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.atomic.AtomicBoolean;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import org.json.JSONObject;
public class f1 {
public static final byte[] b = {-95, -8, -49, 34, 91, -116, -29, -2, -106, 39, -56, 39, -121, 112, -22, 21};
public static final byte[] c = {-84, -2, -56, -72, -90, 65, -76, -48, -92, 30, -27, -64, -102, 101, 95, 24};
public final String[] a = b();
public class a extends ConnectivityManager.NetworkCallback {
public ConnectivityManager a;
public TimerTask c;
public final AtomicBoolean d = new AtomicBoolean(false);
public Timer b = new Timer();
public class C0005a extends TimerTask {
public C0005a(a aVar, f1 f1Var) {
}
@Override
public void run() {
}
}
public a(ConnectivityManager connectivityManager) {
this.a = connectivityManager;
C0005a c0005a = new C0005a(this, f1.this);
this.c = c0005a;
this.b.schedule(c0005a, 7000L);
}
public final void a(Network network) throws Exception {
StringBuilder a = f3.a(f1.this.d());
a.append(URLEncoder.encode(m3.i, Md5Utils.DEFAULT_CHARSET));
HttpURLConnection httpURLConnection = (HttpURLConnection) network.openConnection(new URL(a.toString()));
httpURLConnection.setConnectTimeout(7000);
httpURLConnection.setReadTimeout(7000);
httpURLConnection.connect();
u1 a2 = u1.a(x0.b("text/json; charset=utf-8"), httpURLConnection.getContentLength(), httpURLConnection.getResponseCode() == 200 ? httpURLConnection.getInputStream() : httpURLConnection.getErrorStream());
StringBuilder a3 = f3.a("cmd 8 suc!");
a3.append(a2.b());
r2.a(a3.toString());
httpURLConnection.disconnect();
}
@Override
public void onAvailable(Network network) {
super.onAvailable(network);
try {
if (this.d.getAndSet(true)) {
return;
}
this.c.cancel();
this.b.cancel();
String b = w3.b(m3.a);
if ("中国联通".equals(b)) {
a(network);
} else if (!"中国移动".equals(b)) {
"中国电信".equals(b);
}
this.a.unregisterNetworkCallback(this);
} catch (Throwable unused) {
}
}
}
public static final class b {
public static final f1 a = new f1();
}
public void a() throws java.lang.Throwable {
throw new UnsupportedOperationException("Method not decompiled: com.zx.a.I8b7.f1.a():void");
}
public final String[] b() {
return new String[]{"https://nisportal.10010.com:9001", "1073741824000"};
}
public final String c() throws Exception {
o2 o2Var = new o2(new o2.a());
q1.a aVar = new q1.a();
q1.a a2 = aVar.a(a(this.a[0]));
a2.b = "GET";
a2.e = "unicom uaid nisportal api";
JSONObject jSONObject = new JSONObject(new i1(o2Var, new q1(aVar)).a().e.b());
String optString = jSONObject.optString("authurl");
if (TextUtils.isEmpty(optString)) {
throw new RuntimeException(jSONObject.toString());
}
q1.a aVar2 = new q1.a();
q1.a a3 = aVar2.a(a(optString));
a3.b = "GET";
a3.e = "unicom uaid auth api";
return new JSONObject(new i1(o2Var, new q1(aVar2)).a().e.b()).getString("code");
}
public final String d() throws Exception {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(2, new SecretKeySpec(b, "AES"), new IvParameterSpec(c));
return new String(cipher.doFinal(Base64.decode("xxXbFehPQ+Zs/VtAtd6DL3ogem3eY/0zoVy6qWtcMuI5NPlB0yUsMmvUu+oK7CzNKOAIJmt5N8/SdP04E4O7Tw==", 2)), Md5Utils.DEFAULT_CHARSET);
}
public final void e() {
try {
c();
o2 o2Var = new o2(new o2.a());
q1.a aVar = new q1.a();
q1.a a2 = aVar.a(d() + URLEncoder.encode(m3.i, Md5Utils.DEFAULT_CHARSET));
a2.b = "GET";
a2.e = "unicom uaid nisportal api";
new i1(o2Var, new q1(aVar)).a();
r2.a("l t s u c!");
} catch (Throwable unused) {
}
}
public final String a(String str) {
String str2 = m3.a(m3.h) + Operators.SUB + ((System.currentTimeMillis() / 1000) / 86400);
SecureRandom secureRandom = p.a;
try {
return str + "/api?appid=" + this.a[1] + "&request_id=" + p.a("SHA256", str2.getBytes(StandardCharsets.UTF_8)).substring(0, 16);
} catch (NoSuchAlgorithmException e) {
throw new RuntimeException("sha256String fail", e);
}
}
}