正在查看: 公务员之家 v1.0.1 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 公务员之家 v1.0.1 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.mobile.auth.c;
import android.content.Context;
import android.net.Network;
import android.text.TextUtils;
import com.mobile.auth.c.j;
import com.mobile.auth.c.r;
import com.mobile.auth.gatewayauth.ExceptionProcessor;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class b {
private static final String a = "b";
class AnonymousClass3 extends r.a {
final Context a;
final String b;
final String c;
final String d;
final String e;
final String f;
final com.mobile.auth.a.b g;
AnonymousClass3(Context context, String str, String str2, String str3, String str4, String str5, com.mobile.auth.a.b bVar) {
this.a = context;
this.b = str;
this.c = str2;
this.d = str3;
this.e = str4;
this.f = str5;
this.g = bVar;
}
@Override
public void run() {
try {
if (new j().a(this.a, "https://id6.me/auth/preauth.do")) {
if (a()) {
return;
}
String a = b.a(b.this, this.a, this.b, this.c, this.d, null, this.e, this.f);
if (a()) {
} else {
com.mobile.auth.a.a.b(this.a, a, this.f, this.g);
}
} else if (a()) {
} else {
com.mobile.auth.a.a.b(this.a, o.a(80800, "WIFI切换超时"), this.f, this.g);
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}
static String a() {
try {
return a;
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
public static String a(Context context, String str, String str2, Network network) {
try {
return c(context, i.a(context, str, network), str2, network);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private String a(Context context, String str, String str2, String str3, Network network, String str4, String str5) {
String b;
String a2;
n a3;
try {
new n();
b = b();
a2 = l.a(context, str, str2, str3, b);
String str6 = a;
com.mobile.auth.a.a.a(str6, "request params : " + a2);
a3 = i.a(context, k.j(context), a2, network, str4, str5, true);
if (a3.d) {
a3 = i.a(context, a3.e.equals("2") ? "https://card.e.189.cn/auth/preauth.do" : "https://id6.me/auth/preauth.do", a2, network, str4, str5, false);
}
com.mobile.auth.a.a.a(str6, "request result : " + a3.b);
} catch (Throwable th) {
th = th;
}
try {
a3.b = b(context, a3.b, b, network);
if (TextUtils.isEmpty(a3.b)) {
a3.b = "{\"result\":80001,\"msg\":\"请求异常\"}";
return a3.b;
}
com.mobile.auth.b.e.a(str5, a3.b, a2);
return a3.b;
} catch (Throwable th2) {
th = th2;
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th3) {
ExceptionProcessor.processException(th3);
return null;
}
}
}
private static String a(Context context, List<String> list, String str, Network network) {
for (int i = 0; i < list.size(); i++) {
try {
try {
list.get(i);
TextUtils.isEmpty(list.get(i));
String a2 = a(context, list.get(i), str, network);
try {
JSONObject jSONObject = !TextUtils.isEmpty(a2) ? new JSONObject(a2) : null;
if (jSONObject != null && jSONObject.getInt("result") == 0) {
return a2;
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e2) {
e2.printStackTrace();
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
return null;
}
static String a(b bVar, Context context, String str, String str2, String str3, Network network, String str4, String str5) {
try {
return bVar.a(context, str, str2, str3, network, str4, str5);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
public static String a(String str, String str2) {
try {
return f.b(str, str2);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
return null;
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
return null;
}
}
}
private void a(final Context context, final String str, final r.a aVar, final int i, final com.mobile.auth.a.b bVar) {
try {
final Future b = r.a().b(aVar);
r.a().a(new Runnable() {
@Override
public void run() {
Future future;
Future future2;
try {
try {
b.get(i, TimeUnit.MILLISECONDS);
future2 = b;
} catch (Throwable th) {
try {
aVar.a(true);
if (th instanceof TimeoutException) {
com.mobile.auth.b.e.a(str, "{\"result\":80000,\"msg\":\"请求超时\"}", "");
com.mobile.auth.b.e.a(str).h("submitOnTimeoutInterrupted()");
com.mobile.auth.a.a.b(context, "{\"result\":80000,\"msg\":\"请求超时\"}", str, bVar);
} else {
com.mobile.auth.b.e.a(str, "{\"result\":80001,\"msg\":\"请求异常\"}", "");
com.mobile.auth.b.e.a(str).h("submitOnTimeoutInterrupted other exception : " + th.getMessage());
com.mobile.auth.a.a.a(b.a(), "submitOnTimeoutInterrupted other exception", th);
com.mobile.auth.a.a.b(context, "{\"result\":80001,\"msg\":\"请求异常\"}", str, bVar);
}
Future future3 = b;
if (future3 == null || future3.isDone()) {
return;
} else {
future = b;
}
} catch (Throwable th2) {
Future future4 = b;
if (future4 != null && !future4.isDone()) {
b.cancel(true);
}
throw th2;
}
}
if (future2 == null || future2.isDone()) {
return;
}
future = b;
future.cancel(true);
} catch (Throwable th3) {
try {
ExceptionProcessor.processException(th3);
} catch (Throwable th4) {
ExceptionProcessor.processException(th4);
}
}
}
});
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
private String b() {
try {
String uuid = UUID.randomUUID().toString();
if (TextUtils.isEmpty(uuid)) {
return "";
}
String replace = uuid.replace("-", "");
return replace.length() >= 16 ? replace.substring(0, 16) : replace;
} catch (Throwable th) {
try {
com.mobile.auth.a.a.a(a, "generateAesKey error", th);
return "";
} catch (Throwable th2) {
try {
ExceptionProcessor.processException(th2);
return null;
} catch (Throwable th3) {
ExceptionProcessor.processException(th3);
return null;
}
}
}
}
private String b(Context context, String str, String str2, Network network) {
try {
if (TextUtils.isEmpty(str)) {
return null;
}
try {
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt("result");
String optString = jSONObject.optString("data");
if ((optInt == 0 || optInt == 30002) && !TextUtils.isEmpty(optString)) {
String a2 = a(optString, str2);
if (!TextUtils.isEmpty(a2)) {
try {
jSONObject.put("data", new JSONObject(a2));
} catch (JSONException e) {
e.printStackTrace();
jSONObject.put("data", a2);
}
if (optInt != 30002) {
return jSONObject.toString();
}
JSONObject jSONObject2 = (JSONObject) jSONObject.opt("data");
ArrayList arrayList = new ArrayList();
JSONArray optJSONArray = jSONObject2.optJSONArray("urls");
if (optJSONArray != null) {
for (int i = 0; i < optJSONArray.length(); i++) {
arrayList.add(optJSONArray.getString(i));
}
}
if (arrayList.isEmpty()) {
return null;
}
return a(context, arrayList, str2, network);
}
}
return jSONObject.toString();
} catch (Throwable th) {
com.mobile.auth.a.a.a(a, "decryptResult error", th);
return null;
}
} catch (Throwable th2) {
try {
ExceptionProcessor.processException(th2);
return null;
} catch (Throwable th3) {
ExceptionProcessor.processException(th3);
return null;
}
}
}
private static String c(Context context, String str, String str2, Network network) {
try {
if (TextUtils.isEmpty(str)) {
return null;
}
try {
JSONObject jSONObject = new JSONObject(str);
int optInt = jSONObject.optInt("result");
String optString = jSONObject.optString("data");
if (optInt == 0 && !TextUtils.isEmpty(optString)) {
String a2 = a(optString, str2);
if (!TextUtils.isEmpty(a2)) {
try {
jSONObject.put("data", new JSONObject(a2));
} catch (JSONException e) {
e.printStackTrace();
jSONObject.put("data", a2);
}
}
}
return jSONObject.toString();
} catch (Throwable th) {
com.mobile.auth.a.a.a(a, "decryptResult error", th);
return null;
}
} catch (Throwable th2) {
try {
ExceptionProcessor.processException(th2);
return null;
} catch (Throwable th3) {
ExceptionProcessor.processException(th3);
return null;
}
}
}
public void a(final Context context, final String str, final String str2, final String str3, final com.mobile.auth.a.b bVar) {
try {
int i = com.mobile.auth.a.a.b <= 0 ? 10000 : com.mobile.auth.a.a.b;
final String a2 = e.a();
final String a3 = e.a(context);
com.mobile.auth.b.e.a(a2).a(str).b(a3).d("preauth").c(k.f(context)).i(context.getPackageName());
a(context, a2, new r.a() {
@Override
public void run() {
try {
String a4 = b.a(b.this, context, str, str2, str3, null, a3, a2);
if (a()) {
return;
}
com.mobile.auth.a.a.b(context, a4, a2, bVar);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}, i, bVar);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
public void b(final Context context, final String str, final String str2, final String str3, final com.mobile.auth.a.b bVar) {
try {
int i = com.mobile.auth.a.a.b <= 0 ? 10000 : com.mobile.auth.a.a.b;
final String a2 = e.a();
final String a3 = e.a(context);
com.mobile.auth.b.e.a(a2).a(str).b(a3).d("preauth").c(k.f(context)).i(context.getPackageName());
j jVar = new j();
jVar.a(context, new j.a() {
private boolean i = false;
private boolean j = false;
@Override
public synchronized void a() {
try {
this.i = true;
if (!this.j) {
com.mobile.auth.b.e.a(a2, "{\"result\":80000,\"msg\":\"请求超时\"}", "");
com.mobile.auth.a.a.b(context, "{\"result\":80000,\"msg\":\"请求超时\"}", a2, bVar);
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
@Override
public synchronized void a(int i2, String str4, long j) {
try {
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
if (!this.i && !this.j) {
this.j = true;
com.mobile.auth.b.e.a(a2).h("switchToMobile_L onFail() expendTime : " + j).a(i2).f(str4).b(j);
com.mobile.auth.a.a.b(context, o.a(i2, str4), a2, bVar);
com.mobile.auth.a.a.a(b.a(), "Switching network failed (L), errorMsg :" + str4 + " , expendTime :" + j);
}
}
@Override
public void a(Network network, long j) {
try {
com.mobile.auth.a.a.a(b.a(), "Switching network successfully (L) , expendTime :" + j);
if (!this.i && !this.j) {
com.mobile.auth.b.e.a(a2).b(j);
String a4 = b.a(b.this, context, str, str2, str3, network, a3, a2);
synchronized (this) {
if (!this.i && !this.j) {
this.j = true;
com.mobile.auth.a.a.b(context, a4, a2, bVar);
}
}
}
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
});
jVar.a(i);
} catch (Throwable th) {
try {
ExceptionProcessor.processException(th);
} catch (Throwable th2) {
ExceptionProcessor.processException(th2);
}
}
}
}