九州世界 v1.0版本的 MD5 值为:7e82e48b69a4c36d0bdfb2a8d382d05d
以下内容为反编译后的 MainActivity.java 源代码,内容仅作参考
package com.yyggame.jzsj;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.util.Log;
import android.webkit.JavascriptInterface;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import androidx.appcompat.app.AppCompatActivity;
import com.alipay.sdk.app.PayTask;
import com.alipay.sdk.m.p0.c;
import com.bytedance.applog.AppLog;
import com.bytedance.applog.InitConfig;
import com.bytedance.hume.readapk.HumeSDK;
import com.github.gzuliyujiang.oaid.DeviceIdentifier;
import com.google.gson.Gson;
import com.kwai.monitor.payload.TurboHelper;
import com.tencent.mm.opensdk.modelpay.PayReq;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.yyggame.jzsj.wxapi.JavaBean;
import com.yyggame.jzsj.wxapi.JsonUtil;
import com.yyggame.jzsj.wxapi.LocalDataUtil;
import com.yyggame.jzsj.wxapi.PolicyDialog;
import com.yyggame.jzsj.wxapi.WxPayBean;
import org.simple.eventbus.EventBus;
public class MainActivity extends AppCompatActivity {
public static final int FAILE = 2;
public static final int PAYING = 3;
public static final int SUCCESS = 1;
private String Num;
private JavaBean javaBean;
String orderInfo;
WebView webView;
private IWXAPI wxapi;
String path = "https://jzsjad.yyggame.cn/#/index?channel=";
String pWay = "KS";
Runnable payRunnable = new Runnable() {
@Override
public void run() {
new PayTask(MainActivity.this).payV2(MainActivity.this.orderInfo, true);
new Message();
}
};
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
getWindow().setFlags(1024, 1024);
requestWindowFeature(1);
setContentView(R.layout.activity_main);
EventBus.getDefault().register(this);
final PolicyDialog policyDialog = new PolicyDialog(this);
final LocalDataUtil localDataUtil = new LocalDataUtil(this);
if (localDataUtil.getPolicy()) {
policyDialog.dismiss();
} else {
policyDialog.show();
}
policyDialog.setOnClick(new PolicyDialog.setOnClick() {
@Override
public void onClick(String str) {
if (str.equals("0")) {
localDataUtil.SavePolicy(true);
policyDialog.dismiss();
return;
}
MainActivity.this.finish();
}
});
String channel = this.pWay == "KS" ? TurboHelper.getChannel(this) : HumeSDK.getChannel(this);
if (TextUtils.isEmpty(channel)) {
this.Num = "GE3TANJVGA3TKNRX";
} else {
this.Num = channel;
}
WebView webView = (WebView) findViewById(R.id.webView);
this.webView = webView;
webView.loadUrl(this.path + this.Num);
WebSettings settings = this.webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setAllowFileAccess(true);
settings.setDomStorageEnabled(true);
settings.setSupportMultipleWindows(true);
this.webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView webView2, WebResourceRequest webResourceRequest) {
WebView webView3 = MainActivity.this.webView;
webView3.loadUrl(MainActivity.this.path + MainActivity.this.Num);
return true;
}
});
this.webView.setHorizontalScrollBarEnabled(false);
this.webView.setVerticalScrollBarEnabled(false);
this.webView.addJavascriptInterface(new Object() {
@JavascriptInterface
public void callJava(String str, String str2) {
if (str.equals("alipay")) {
MainActivity.this.orderInfo = str2;
new Thread(MainActivity.this.payRunnable).start();
} else if (str.equals("wxpay")) {
WxPayBean wxPayBean = (WxPayBean) JsonUtil.parseBean(str2, (Class<Object>) WxPayBean.class);
PayReq payReq = new PayReq();
payReq.appId = wxPayBean.getAppid();
payReq.partnerId = wxPayBean.getPartnerid();
payReq.prepayId = wxPayBean.getPrepayid();
payReq.packageValue = "Sign=WXPay";
payReq.nonceStr = wxPayBean.getNoncestr();
payReq.timeStamp = wxPayBean.getTimestamp();
payReq.sign = wxPayBean.getSign();
MainActivity.this.wxapi.sendReq(payReq);
} else {
MainActivity.this.javaBean = new JavaBean();
MainActivity.this.javaBean.setAppId(MainActivity.this.obtainDeviceId());
MainActivity.this.javaBean.setOpenid("");
MainActivity.this.javaBean.setAvatar("");
MainActivity.this.javaBean.setNickname("");
final String json = new Gson().toJson(MainActivity.this.javaBean);
if (Looper.myLooper() != Looper.getMainLooper()) {
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
WebView webView2 = MainActivity.this.webView;
webView2.loadUrl("javascript:wxloginCallback('" + json + "')");
}
});
} else {
WebView webView2 = MainActivity.this.webView;
webView2.loadUrl("javascript:wxloginCallback('" + json + "')");
}
Log.d("TAG", "call: window.Android.message" + str + "aaaaaaaaaaaaaaaaa");
}
Log.d("TAG", "call: window.Android.message" + str + "aaaaaaaaaaaaaaaaa");
}
@JavascriptInterface
public void callJava(String str) {
Log.d("TAG", "call: window.Android.message" + str + "aaaaaaaaaaaabbaaaaa");
}
}, "android");
this.webView.getSettings().setJavaScriptEnabled(true);
this.webView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView webView2, String str) {
if (str.startsWith("weixin://") || str.startsWith("alipays://")) {
try {
MainActivity.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
return true;
} catch (ActivityNotFoundException unused) {
return true;
}
}
webView2.loadUrl(str);
return false;
}
});
if (this.pWay == "DY") {
InitConfig initConfig = new InitConfig("578013", this.Num);
initConfig.setUriConfig(0);
initConfig.setImeiEnable(false);
initConfig.setAutoTrackEnabled(true);
initConfig.setLogEnable(false);
initConfig.setMacEnable(false);
initConfig.setImeiEnable(false);
initConfig.setIccIdEnabled(false);
initConfig.setSerialNumberEnable(false);
initConfig.setGaidEnabled(false);
initConfig.setGaidTimeOutMilliSeconds(c.n);
initConfig.setOperatorInfoEnabled(false);
AppLog.setEncryptAndCompress(true);
AppLog.setDevToolsEnable(false);
initConfig.setEnablePlay(true);
AppLog.init(this, initConfig);
}
}
public String obtainDeviceId() {
return DeviceIdentifier.getOAID(this);
}
@Override
public void onDestroy() {
super.onDestroy();
EventBus.getDefault().unregister(this);
}
}