正在查看: Oolka v2.4.42 应用的 GetTokenActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Oolka v2.4.42 应用的 GetTokenActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.ybl.ypp.sdk;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.telephony.SubscriptionInfo;
import android.util.Base64;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.b;
import com.google.gson.JsonObject;
import java.security.SecureRandom;
import java.util.List;
import one.upswing.sdk.O0;
import one.upswing.sdk.g5;
import one.upswing.sdk.h0;
import one.upswing.sdk.i1;
import one.upswing.sdk.i2;
import one.upswing.sdk.j2;
import one.upswing.sdk.k;
import one.upswing.sdk.u3;
import one.upswing.sdk.y3;
public class GetTokenActivity extends AppCompatActivity {
public List G;
public String H;
public String I;
public String c0;
public final O0 p1;
public boolean x1;
public String A0 = "";
public final GetTokenActivity C0 = this;
public final int c1 = 1;
public GetTokenActivity() {
if (O0.b == null) {
O0.b = new O0();
}
this.p1 = O0.b;
this.x1 = false;
}
public final void n0() {
try {
if (getIntent().hasExtra("isTalsecImported") && !getIntent().getStringExtra("isTalsecImported").equals("") && getIntent().getStringExtra("isTalsecImported").equals("true") && g5.d(this.C0)) {
this.x1 = true;
}
if (getIntent().getStringExtra("key") == null) {
q0("Please Provide partner key", "P006");
return;
}
if (getIntent().getStringExtra("key").trim().equals("")) {
q0("Please Provide partner key", "P006");
return;
}
if (getIntent().getStringExtra("key").length() != 10) {
q0("Please Provide correct partner key", "P001");
return;
}
if (getIntent().getStringExtra("PartnerReferenceNumber") == null) {
q0("Please Provide partner reference number", "P006");
return;
}
if (getIntent().getStringExtra("PartnerReferenceNumber").equals("")) {
q0("Please Provide partner reference number", "P006");
return;
}
if (getIntent().getStringExtra("mobileNumber") == null) {
q0("Please Provide mobile number", "P006");
return;
}
if (getIntent().getStringExtra("mobileNumber").equals("")) {
q0("Please Provide mobile number", "P006");
return;
}
if (getIntent().getStringExtra("mobileNumber").length() < 8 || getIntent().getStringExtra("mobileNumber").length() > 10) {
q0("Please Provide correct mobile number", "DB005");
return;
}
if (getIntent().getStringExtra("encryptionkey") == null) {
q0("Please Provide encryption key", "P006");
return;
}
if (getIntent().getStringExtra("encryptionkey").equals("")) {
q0("Please Provide encryption key", "P006");
return;
}
if (getIntent().getStringExtra("servicename") == null) {
q0("Please Provide service name", "P006");
return;
}
if (getIntent().getStringExtra("servicename").equals("")) {
q0("Please Provide service name", "P006");
return;
}
if (i1.b(this.C0, this.x1)) {
q0("Device not supported", "DB010");
return;
}
this.c0 = g5.b(this);
this.H = "Android " + Build.VERSION.RELEASE;
this.I = getApplicationContext().getPackageName();
g5.a();
if (this.c0.equals("")) {
q0("Unknown Error", "DB011");
} else if (this.I.equals("")) {
q0("Unknown Error", "DB011");
} else {
o0(this.C0);
}
} catch (Exception e) {
q0("Unknown Error - " + e.getMessage(), "DB011");
}
}
public final void o0(Context context) {
try {
List a = k.a(context);
this.G = a;
if (a == null) {
q0("Unable to send SMS due to issue detected with selected sim - send sim details empty", "DB116");
return;
}
if (a.size() <= 0) {
q0("SIM not present", "DB008");
return;
}
for (SubscriptionInfo subscriptionInfo : this.G) {
if (this.A0.equals("")) {
this.A0 = g5.b(context) + String.valueOf(subscriptionInfo.getSubscriptionId());
} else {
this.A0 += "," + g5.b(context) + String.valueOf(subscriptionInfo.getSubscriptionId());
}
}
if (getIntent().getStringExtra("servicename").equals("TPT_BANKING_SERVICES_CONSENT")) {
q0("Unknown Error - Service Not Allowed", "DB011");
} else if (this.A0.equals("")) {
q0("Unable to send SMS due to issue detected with selected sim - subscriptionId empty", "DB116");
} else {
p0(this.A0);
}
} catch (Exception e) {
e.getMessage();
q0("Unable to send SMS due to issue detected with selected sim - " + e.getMessage(), "DB116");
}
}
public final void onBackPressed() {
}
public final void onCreate(Bundle bundle) {
super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
if (Build.VERSION.SDK_INT != 26) {
setRequestedOrientation(1);
}
getWindow().setFlags(8192, 8192);
setContentView(i2.b);
if (getIntent().getStringExtra("showProgressDialog") == null) {
this.p1.a(this.C0, j2.a);
} else if (getIntent().getStringExtra("showProgressDialog").equalsIgnoreCase("true")) {
this.p1.a(this.C0, j2.a);
} else if (!getIntent().getStringExtra("showProgressDialog").equalsIgnoreCase("false")) {
this.p1.a(this.C0, j2.a);
}
int a = b.a(this.C0, "android.permission.READ_PHONE_STATE");
int a2 = b.a(this.C0, "android.permission.SEND_SMS");
if (a == 0 && a2 == 0) {
n0();
} else {
androidx.core.app.b.w(this, new String[]{"android.permission.READ_PHONE_STATE", "android.permission.SEND_SMS"}, this.c1);
}
}
public final void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
super/*androidx.fragment.app.FragmentActivity*/.onRequestPermissionsResult(i, strArr, iArr);
if (i == 1) {
int i2 = iArr[0];
int i3 = iArr[1];
if (i2 == -1) {
q0("READ_PHONE_STATE access denied", "DB017");
}
if (i3 == -1) {
q0("SEND_SMS access denied", "DB018");
}
if (i2 == 0 && i3 == 0) {
n0();
}
}
}
public final void p0(String str) {
JsonObject jsonObject = new JsonObject();
JsonObject jsonObject2 = new JsonObject();
jsonObject.addProperty("partnerReferenceNumber", getIntent().getStringExtra("PartnerReferenceNumber"));
jsonObject.addProperty("deviceId", this.c0);
jsonObject.addProperty("simId", str);
jsonObject.addProperty("applicationPackageName", this.I);
jsonObject.addProperty("deviceOS", this.H);
jsonObject.addProperty("mobileNumber", getIntent().getStringExtra("mobileNumber"));
jsonObject.addProperty("serviceName", getIntent().getStringExtra("servicename"));
jsonObject.addProperty("sdkValidationCheck", "true");
jsonObject.addProperty("udf1", "");
jsonObject.addProperty("udf2", "");
jsonObject.addProperty("udf3", "");
jsonObject.addProperty("udf4", "");
if (getIntent().hasExtra("registrationReferenceNumber") && !getIntent().getStringExtra("registrationReferenceNumber").equals("")) {
jsonObject.addProperty("registrationReferenceNumber", getIntent().getStringExtra("registrationReferenceNumber"));
}
try {
byte[] bArr = new byte[16];
SecureRandom.getInstance("SHA1PRNG").nextBytes(bArr);
String c = g5.c(jsonObject.toString(), getIntent().getStringExtra("encryptionkey"), bArr);
if (c.equals("")) {
q0("Invalid encryption key passed", "DB117");
return;
}
jsonObject2.addProperty("iv", Base64.encodeToString(bArr, 2));
jsonObject2.addProperty("key", getIntent().getStringExtra("key"));
jsonObject2.addProperty("serviceName", getIntent().getStringExtra("servicename"));
jsonObject2.addProperty("body", c);
u3.b(this.C0, ((y3) u3.a(this.C0).b(y3.class)).d(jsonObject2, "3.17"), new h0(this));
} catch (Exception e) {
e.getMessage();
q0("Unknown Error - " + e.getMessage(), "DB011");
}
}
public final void q0(String str, String str2) {
O0 o0 = this.p1;
Dialog dialog = o0.a;
if (dialog != null) {
dialog.dismiss();
o0.a = null;
}
Intent intent = new Intent();
intent.putExtra("status_code", str2);
intent.putExtra("error_msg", str);
setResult(0, intent);
finish();
}
}