MT Manager v2.15.3版本的 MD5 值为:1cbd6ee7afdac97645dd3a8c4751ecf0
以下内容为反编译后的 C10552.java 源代码,内容仅作参考
package l;
import com.alipay.sdk.m.s.a;
import com.umeng.analytics.pro.am;
import java.io.IOException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class C10552 {
public static String f32319;
public static String m23876(String str, String str2, String str3) {
if (str2.equals("zh")) {
str2 = "zh-CHS";
}
if (str3.equals("zh")) {
str3 = "zh-CHS";
}
if (f32319 == null) {
String headerField = new C14762("http://m.youdao.com/translate", false).m30902().getHeaderField("Set-Cookie");
if (headerField == null) {
throw new IOException("Can not get cookie");
}
int indexOf = headerField.indexOf(59);
if (indexOf != -1) {
headerField = headerField.substring(0, indexOf);
}
f32319 = headerField;
}
String str4 = System.currentTimeMillis() + "1";
try {
byte[] digest = MessageDigest.getInstance("MD5").digest(("fanyideskweb" + str + str4 + "Ygy_4c=r#e#4EX^NUGUc5").getBytes(a.B));
char[] cArr = new char[digest.length * 2];
int i = 0;
for (byte b : digest) {
int i2 = i + 1;
cArr[i] = "0123456789abcdef".charAt((b >>> 4) & 15);
i += 2;
cArr[i2] = "0123456789abcdef".charAt(b & 15);
}
String str5 = new String(cArr);
C14762 c14762 = new C14762("https://fanyi.youdao.com/translate_o", true);
c14762.m30905("Referer", "https://fanyi.youdao.com/");
c14762.m30905("Cookie", f32319);
c14762.m30903(am.aC, str);
c14762.m30903("from", str2);
c14762.m30903("to", str3);
c14762.m30903("client", "fanyideskweb");
c14762.m30903("salt", str4);
c14762.m30903("sign", str5);
c14762.m30903("doctype", "json");
c14762.m30903("version", "1.0");
c14762.m30903("keyfrom", "fanyi.web");
try {
JSONObject jSONObject = new JSONObject(c14762.m30904());
try {
int i3 = jSONObject.getInt("errorCode");
if (i3 == 0) {
JSONArray jSONArray = jSONObject.getJSONArray("translateResult");
StringBuilder sb = new StringBuilder();
for (int i4 = 0; i4 < jSONArray.length(); i4++) {
sb.append(jSONArray.getString(i4));
}
return sb.toString();
}
if (i3 == 50) {
f32319 = null;
}
throw new IOException(jSONObject.toString());
} catch (JSONException e) {
throw new IOException(e.getMessage(), e);
}
} catch (JSONException e2) {
throw new IOException(e2);
}
} catch (NoSuchAlgorithmException e3) {
throw new RuntimeException(e3);
}
}
}