Booty Calls v1.2.156版本的 MD5 值为:919c7e4dc831ea1adbaf506a3cc1a198
以下内容为反编译后的 SandboxLoginApi.java 源代码,内容仅作参考
package com.dmm.games.auth.sandbox;
import androidx.core.app.NotificationCompat;
import com.dmm.games.gson.Gson;
import com.dmm.games.gson.GsonBuilder;
import com.dmm.games.gson.annotations.SerializedName;
import com.dmm.games.http.DmmGamesHttp;
import com.dmm.games.http.Method;
import com.dmm.games.log.Log;
import com.helpshift.HelpshiftEvent;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Map;
import okhttp3.ResponseBody;
public class SandboxLoginApi {
private static final Gson gson = new GsonBuilder().create();
private static final Map<String, String> requestBaseBody;
private static final String url = "http://sba-netgame.dmm.com/sp/api/android";
static {
HashMap hashMap = new HashMap();
requestBaseBody = hashMap;
hashMap.put(HelpshiftEvent.DATA_MESSAGE, "Auth.LoginSmartPhone");
requestBaseBody.put("appid", "");
}
private static class RequestParam {
@SerializedName("password")
private String password;
@SerializedName("loginId")
private String userId;
@SerializedName("loginKind")
private final String loginKind = "dmmportal";
@SerializedName("jpStatus")
private final String status = "1";
@SerializedName("isAdult")
private final String isAdult = "1";
@SerializedName("remoteAddress")
private final String remoteAddress = "";
@SerializedName("httpAcceptLanguage")
private final String acceptLanguage = "ja";
public RequestParam(String str, String str2) {
this.userId = str;
this.password = str2;
}
}
public static class Request extends DmmGamesHttp.Request<Response> {
private String password;
private String userId;
@Override
protected String getContentType() {
return "application/x-www-form-urlencoded";
}
@Override
protected Map<String, String> getRequestHeaders() {
return null;
}
@Override
protected String getUrl() {
return SandboxLoginApi.url;
}
public Request(String str, String str2) {
super(Response.class);
this.userId = str;
this.password = str2;
}
@Override
public Method getHttpMethod() {
return Method.POST;
}
@Override
protected byte[] getBody() {
StringBuilder sb = new StringBuilder();
HashMap hashMap = new HashMap(SandboxLoginApi.requestBaseBody);
for (String str : SandboxLoginApi.requestBaseBody.keySet()) {
sb.append(String.format("%s=%s&", str, SandboxLoginApi.requestBaseBody.get(str)));
}
RequestParam requestParam = new RequestParam(this.userId, this.password);
sb.append("params=");
sb.append(SandboxLoginApi.gson.toJson(requestParam));
hashMap.put("params", SandboxLoginApi.gson.toJson(requestParam));
return sb.toString().getBytes(StandardCharsets.UTF_8);
}
}
public static class Response extends DmmGamesHttp.Response {
private Model body;
private String rawBody;
public Model get() {
return this.body;
}
public String getRawBody() {
return this.rawBody;
}
@Override
protected void parse(ResponseBody responseBody) throws Throwable {
this.rawBody = responseBody.string();
Log.debug().println("Response Body Raw String : " + this.rawBody);
this.body = (Model) SandboxLoginApi.gson.fromJson(this.rawBody, Model.class);
}
public static class Model {
@SerializedName("data")
private Entity entity;
@SerializedName("error")
private String errorCode;
@SerializedName(NotificationCompat.CATEGORY_EVENT)
private boolean eventResult;
@SerializedName("exectime")
private String executeTime;
@SerializedName("memory")
private String memoryUsage;
public boolean isEventResult() {
return this.eventResult;
}
public String getExecuteTime() {
return this.executeTime;
}
public String getMemoryUsage() {
return this.memoryUsage;
}
public String getErrorCode() {
return this.errorCode;
}
public Entity getEntity() {
return this.entity;
}
public static class Entity {
@SerializedName("appToken")
private String appToken;
@SerializedName("autoLoginToken")
private String autoLoginToken;
@SerializedName("grade")
private String grade;
@SerializedName("loginDevice")
private String loginDevice;
@SerializedName("memberId")
private String memberId;
@SerializedName("secureId")
private String secureId;
@SerializedName("sendMailFlg")
private String sendMailFlg;
@SerializedName("uniqueId")
private String uniqueId;
@SerializedName("url")
private String url;
public String getMemberId() {
return this.memberId;
}
public String getUniqueId() {
return this.uniqueId;
}
public String getSecureId() {
return this.secureId;
}
public String getAutoLoginToken() {
return this.autoLoginToken;
}
public String getSendMailFlg() {
return this.sendMailFlg;
}
public String getLoginDevice() {
return this.loginDevice;
}
public String getAppToken() {
return this.appToken;
}
public String getUrl() {
return this.url;
}
public String getGrade() {
return this.grade;
}
}
}
}
}