91暗网 v2.032版本的 MD5 值为:84da7129e49fe272376e741e6f3c5975
以下内容为反编译后的 h.java 源代码,内容仅作参考
package g.a.b.j;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import android.net.Uri;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import android.view.WindowManager;
import androidx.appcompat.widget.ActivityChooserModel;
import com.alibaba.fastjson.asm.Opcodes;
import g.a.b.c.a;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.net.URLDecoder;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.security.interfaces.RSAPublicKey;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.conscrypt.EvpMdRef;
import org.json.JSONObject;
public class h {
public static final String[] a = {"10.1.5.1013151", "10.1.5.1013148"};
public static class a implements Runnable {
public final Activity c;
public a(Activity activity) {
this.c = activity;
}
@Override
public void run() {
this.c.finish();
}
}
public static final class b {
public final PackageInfo a;
public final int b;
public final String c;
public b(PackageInfo packageInfo, int i2, String str) {
this.a = packageInfo;
this.b = i2;
this.c = str;
}
public boolean a() {
return this.a.versionCode < this.b;
}
public boolean b(g.a.b.h.a aVar) {
Signature[] signatureArr = this.a.signatures;
if (signatureArr == null || signatureArr.length == 0) {
return false;
}
for (Signature signature : signatureArr) {
String d2 = h.d(aVar, signature.toByteArray());
if (d2 != null && !TextUtils.equals(d2, this.c)) {
g.a.b.a.g.c.c(aVar, "biz", "PublicKeyUnmatch", String.format("Got %s, expected %s", d2, this.c));
return true;
}
}
return false;
}
}
public static b a(g.a.b.h.a aVar, Context context, List<a.b> list) {
PackageInfo packageInfo;
String str;
if (list == null) {
return null;
}
for (a.b bVar : list) {
if (bVar != null) {
String str2 = bVar.a;
int i2 = bVar.b;
String str3 = bVar.c;
try {
packageInfo = context.getPackageManager().getPackageInfo(str2, Opcodes.CHECKCAST);
} catch (Throwable th) {
g.a.b.a.g.c.c(aVar, "auth", "GetPackageInfoEx", th.getMessage());
packageInfo = null;
}
boolean z = false;
if (packageInfo == null) {
str = "info == null";
} else {
Signature[] signatureArr = packageInfo.signatures;
if (signatureArr == null) {
str = "info.signatures == null";
} else if (signatureArr.length <= 0) {
str = "info.signatures.length <= 0";
} else {
z = true;
str = "";
}
}
if (!z) {
g.a.b.a.g.c.c(aVar, "auth", "NotIncludeSignatures", str);
}
b bVar2 = (z && packageInfo != null) ? new b(packageInfo, i2, str3) : null;
if (bVar2 != null && !bVar2.b(aVar) && !bVar2.a()) {
return bVar2;
}
}
}
return null;
}
public static String b(int i2) {
Random random = new Random();
StringBuilder sb = new StringBuilder();
for (int i3 = 0; i3 < i2; i3++) {
int nextInt = random.nextInt(3);
if (nextInt == 0) {
sb.append(String.valueOf((char) Math.round((Math.random() * 25.0d) + 65.0d)));
} else if (nextInt == 1) {
sb.append(String.valueOf((char) Math.round((Math.random() * 25.0d) + 97.0d)));
} else if (nextInt == 2) {
sb.append(String.valueOf(new Random().nextInt(10)));
}
}
return sb.toString();
}
public static String c(Context context, String str) {
String str2 = "";
try {
String str3 = "";
for (ActivityManager.RunningAppProcessInfo runningAppProcessInfo : ((ActivityManager) context.getApplicationContext().getSystemService(ActivityChooserModel.ATTRIBUTE_ACTIVITY)).getRunningAppProcesses()) {
if (runningAppProcessInfo.processName.equals(str)) {
str3 = str3 + "#M";
} else {
if (runningAppProcessInfo.processName.startsWith(str + ":")) {
StringBuilder sb = new StringBuilder();
sb.append(str3);
sb.append("#");
sb.append(runningAppProcessInfo.processName.replace(str + ":", ""));
str3 = sb.toString();
}
}
}
str2 = str3;
} catch (Throwable unused) {
}
if (str2.length() > 0) {
str2 = str2.substring(1);
}
return str2.length() == 0 ? "N" : str2;
}
public static String d(g.a.b.h.a aVar, byte[] bArr) {
BigInteger modulus;
try {
PublicKey publicKey = ((X509Certificate) CertificateFactory.getInstance("X.509").generateCertificate(new ByteArrayInputStream(bArr))).getPublicKey();
if (!(publicKey instanceof RSAPublicKey) || (modulus = ((RSAPublicKey) publicKey).getModulus()) == null) {
return null;
}
return modulus.toString(16);
} catch (Exception e2) {
g.a.b.a.g.c.d(aVar, "auth", "GetPublicKeyFromSignEx", e2);
return null;
}
}
public static String e(String str, String str2, String str3) {
try {
int indexOf = str3.indexOf(str) + str.length();
if (indexOf <= str.length()) {
return "";
}
int indexOf2 = TextUtils.isEmpty(str2) ? 0 : str3.indexOf(str2, indexOf);
if (indexOf2 < 1) {
return str3.substring(indexOf);
}
return str3.substring(indexOf, indexOf2);
} catch (Throwable unused) {
return "";
}
}
public static Map<String, String> f(g.a.b.h.a aVar, String str) {
String[] split;
HashMap hashMap = new HashMap(4);
int indexOf = str.indexOf(63);
if (indexOf != -1 && indexOf < str.length() - 1) {
for (String str2 : str.substring(indexOf + 1).split("&")) {
int indexOf2 = str2.indexOf(61, 1);
if (indexOf2 != -1 && indexOf2 < str2.length() - 1) {
hashMap.put(str2.substring(0, indexOf2), h(aVar, str2.substring(indexOf2 + 1)));
}
}
}
return hashMap;
}
public static boolean g(g.a.b.h.a aVar, String str, Activity activity) {
int parseInt;
String substring;
if (TextUtils.isEmpty(str)) {
return true;
}
if (!str.toLowerCase().startsWith("alipays://platformapi/startApp?".toLowerCase()) && !str.toLowerCase().startsWith("intent://platformapi/startapp?".toLowerCase())) {
if (!TextUtils.equals(str, "sdklite://h5quit") && !TextUtils.equals(str, "http://m.alipay.com/?action=h5quit")) {
if (str.startsWith("sdklite://h5quit?result=")) {
try {
String substring2 = str.substring(str.indexOf("sdklite://h5quit?result=") + 24);
parseInt = Integer.parseInt(substring2.substring(substring2.lastIndexOf("&end_code=") + 10));
} catch (Exception unused) {
g.a.b.a.f a2 = g.a.b.a.f.a(4001);
g.a.b.a.e.b = g.a.b.a.e.a(a2.c, a2.f2000d, "");
}
if (parseInt != 9000 && parseInt != 8000) {
g.a.b.a.f a3 = g.a.b.a.f.a(4000);
g.a.b.a.e.b = g.a.b.a.e.a(a3.c, a3.f2000d, "");
activity.runOnUiThread(new a(activity));
return true;
}
if (g.a.b.b.a.b) {
StringBuilder sb = new StringBuilder();
String decode = URLDecoder.decode(str);
String decode2 = URLDecoder.decode(decode);
String str2 = decode2.substring(decode2.indexOf("sdklite://h5quit?result=") + 24, decode2.lastIndexOf("&end_code=")).split("&return_url=")[0];
int indexOf = decode.indexOf("&return_url=") + 12;
sb.append(str2);
sb.append("&return_url=");
sb.append(decode.substring(indexOf, decode.indexOf("&", indexOf)));
sb.append(decode.substring(decode.indexOf("&", indexOf)));
substring = sb.toString();
} else {
String decode3 = URLDecoder.decode(str);
substring = decode3.substring(decode3.indexOf("sdklite://h5quit?result=") + 24, decode3.lastIndexOf("&end_code="));
}
g.a.b.a.f a4 = g.a.b.a.f.a(parseInt);
g.a.b.a.e.b = g.a.b.a.e.a(a4.c, a4.f2000d, substring);
activity.runOnUiThread(new a(activity));
return true;
}
return false;
}
g.a.b.a.e.b = g.a.b.a.e.b();
activity.finish();
return true;
}
try {
b a5 = a(aVar, activity, g.a.b.a.d.f1991d);
if (a5 != null && !a5.a() && !a5.b(aVar)) {
if (str.startsWith("intent://platformapi/startapp")) {
str = str.replaceFirst("intent://platformapi/startapp\\?", "alipays://platformapi/startApp?");
}
activity.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
}
} catch (Throwable unused2) {
}
return true;
}
public static String h(g.a.b.h.a aVar, String str) {
try {
return URLDecoder.decode(str, "utf-8");
} catch (UnsupportedEncodingException e2) {
g.a.b.a.g.c.d(aVar, "biz", "H5PayDataAnalysisError", e2);
return "";
}
}
public static Map<String, String> i(String str) {
String[] split;
HashMap hashMap = new HashMap();
for (String str2 : str.split("&")) {
int indexOf = str2.indexOf("=", 1);
if (-1 != indexOf) {
hashMap.put(str2.substring(0, indexOf), URLDecoder.decode(str2.substring(indexOf + 1)));
}
}
return hashMap;
}
public static boolean j(Context context) {
String str;
try {
PackageManager packageManager = context.getPackageManager();
try {
str = g.a.b.a.d.f1991d.get(0).a;
} catch (Throwable unused) {
str = "com.eg.android.AlipayGphone";
}
PackageInfo packageInfo = packageManager.getPackageInfo(str, 128);
if (packageInfo == null) {
return false;
}
return packageInfo.versionCode < 99;
} catch (Throwable th) {
e.a.a.b.a.l(th);
return false;
}
}
public static boolean k(g.a.b.h.a aVar, Context context, List<a.b> list) {
try {
for (a.b bVar : list) {
if (bVar != null) {
try {
if (context.getPackageManager().getPackageInfo(bVar.a, 128) != null) {
return true;
}
} catch (PackageManager.NameNotFoundException unused) {
continue;
}
}
}
return false;
} catch (Throwable th) {
g.a.b.a.g.c.d(aVar, "biz", "CheckLaunchAppExistEx", th);
return false;
}
}
public static String l() {
String str = "Unavailable";
try {
BufferedReader bufferedReader = new BufferedReader(new FileReader("/proc/version"), 256);
String readLine = bufferedReader.readLine();
bufferedReader.close();
Matcher matcher = Pattern.compile("\\w+\\s+\\w+\\s+([^\\s]+)\\s+\\(([^\\s@]+(?:@[^\\s.]+)?)[^)]*\\)\\s+\\((?:[^(]*\\([^)]*\\))?[^)]*\\)\\s+([^\\s]+)\\s+(?:PREEMPT\\s+)?(.+)").matcher(readLine);
if (matcher.matches() && matcher.groupCount() >= 4) {
str = matcher.group(1) + "\n" + matcher.group(2) + " " + matcher.group(3) + "\n" + matcher.group(4);
}
} catch (IOException unused) {
}
int indexOf = str.indexOf("-");
if (indexOf != -1) {
str = str.substring(0, indexOf);
}
int indexOf2 = str.indexOf("\n");
if (indexOf2 != -1) {
str = str.substring(0, indexOf2);
}
return g.b.a.a.a.E("Linux ", str);
}
public static JSONObject m(String str) {
try {
return new JSONObject(str);
} catch (Throwable unused) {
return new JSONObject();
}
}
public static String n(Context context) {
DisplayMetrics displayMetrics = new DisplayMetrics();
((WindowManager) context.getApplicationContext().getSystemService("window")).getDefaultDisplay().getMetrics(displayMetrics);
return displayMetrics.widthPixels + "*" + displayMetrics.heightPixels;
}
public static String o(String str) {
try {
Uri parse = Uri.parse(str);
return String.format("%s%s", parse.getAuthority(), parse.getPath());
} catch (Throwable th) {
e.a.a.b.a.l(th);
return "-";
}
}
public static String p(String str) {
try {
MessageDigest messageDigest = MessageDigest.getInstance(EvpMdRef.MD5.JCA_NAME);
messageDigest.update(str.getBytes());
byte[] digest = messageDigest.digest();
StringBuilder sb = new StringBuilder(digest.length * 2);
for (byte b2 : digest) {
sb.append(Character.forDigit((b2 & 240) >> 4, 16));
sb.append(Character.forDigit(b2 & 15, 16));
}
return sb.toString();
} catch (NoSuchAlgorithmException unused) {
return "";
}
}
}