JieJing Cleaner v1.4.2版本的 MD5 值为:a574eea9fb07160f0bbb08ba0adf1c62
以下内容为反编译后的 w.java 源代码,内容仅作参考
package l1L1L1L1L1l1LLL1LL1ll.L1L1L1Ll1l1L1l1l11L.Ll1lLl1l1LL1l1Ll;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Pair;
import com.baidu.mobads.sdk.internal.ae;
import com.baidu.mobads.sdk.internal.bf;
import com.bytedance.applog.AppLog;
import com.bytedance.applog.network.RangersHttpException;
import com.bytedance.frameworks.core.encrypt.RequestEncryptUtils;
import com.umeng.analytics.pro.ak;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.zip.GZIPInputStream;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class w {
public static String f4598L1L1l1lL1l1l1Ll11L = "https://databyterangers.com.cn";
public static JSONObject f4602lilil1liLi1lLL1l1l;
public static final String[] f4599Ll1lLl1l1LL1l1Ll = {ae.c, ae.b};
public static final String[] f4601l1l1l1l1LL1L1l1lL1l = {"aid", "app_version", "tt_data", "device_id"};
public static final String[] f4600l1L1L1L1L1l1LLL1LL1ll = {"aid", "version_code", "ab_version", "iid", "device_platform"};
public static final String[] f4597L1L1L1Ll1l1L1l1l11L = {"tt_data", "device_platform"};
public static class Ll1lLl1l1LL1l1Ll {
public String f4603Ll1lLl1l1LL1l1Ll;
public byte[] f4604lilil1liLi1lLL1l1l;
}
public static String Ll1lLl1l1LL1l1Ll(int i2, String str, HashMap<String, String> hashMap, byte[] bArr, int i3) {
return Ll1lLl1l1LL1l1Ll(i2, str, hashMap, bArr, 0, i3).f4603Ll1lLl1l1LL1l1Ll;
}
public static String Ll1lLl1l1LL1l1Ll(String str) {
String[] strArr;
if (!TextUtils.isEmpty(str) && AppLog.getEncryptAndCompress()) {
Uri parse = Uri.parse(str);
String query = parse.getQuery();
ArrayList arrayList = new ArrayList();
for (String str2 : f4601l1l1l1l1LL1L1l1lL1l) {
String queryParameter = parse.getQueryParameter(str2);
if (!TextUtils.isEmpty(queryParameter)) {
arrayList.add(new Pair(str2, queryParameter));
}
}
Uri.Builder buildUpon = parse.buildUpon();
buildUpon.clearQuery();
Iterator it = arrayList.iterator();
while (it.hasNext()) {
Pair pair = (Pair) it.next();
buildUpon.appendQueryParameter((String) pair.first, (String) pair.second);
}
buildUpon.appendQueryParameter("tt_info", new String(Base64.encode(l1L1L1L1L1l1LLL1LL1ll.Ll1lLl1l1LL1l1Ll.Ll1lLl1l1LL1l1Ll.L1Lll1ll1Ll1ll1L.l1L1L1L1L1l1LLL1LL1ll.Ll1l1L1L1L1l1L1l(query), 8)));
return buildUpon.build().toString();
}
return str;
}
public static String Ll1lLl1l1LL1l1Ll(String str, String[] strArr) {
if (TextUtils.isEmpty(str)) {
return str;
}
Uri parse = Uri.parse(str);
HashMap hashMap = new HashMap(strArr.length);
for (String str2 : strArr) {
String queryParameter = parse.getQueryParameter(str2);
if (!TextUtils.isEmpty(queryParameter)) {
hashMap.put(str2, queryParameter);
}
}
Uri.Builder buildUpon = parse.buildUpon();
buildUpon.clearQuery();
for (String str3 : hashMap.keySet()) {
buildUpon.appendQueryParameter(str3, (String) hashMap.get(str3));
}
return buildUpon.build().toString();
}
public static HashMap<String, String> Ll1lLl1l1LL1l1Ll() {
HashMap<String, String> hashMap = new HashMap<>(2);
hashMap.put(com.anythink.expressad.foundation.f.f.g.c.a, AppLog.getEncryptAndCompress() ? "application/octet-stream;tt-data=a" : "application/json; charset=utf-8");
return hashMap;
}
public static Ll1lLl1l1LL1l1Ll Ll1lLl1l1LL1l1Ll(int i2, String str, HashMap<String, String> hashMap, byte[] bArr, int i3, int i4) {
RangersHttpException th;
DataOutputStream dataOutputStream;
InputStream inputStream;
BufferedReader bufferedReader;
HttpURLConnection httpURLConnection;
int responseCode;
BufferedReader bufferedReader2;
BufferedReader bufferedReader3;
ByteArrayOutputStream byteArrayOutputStream = null;
if (x1.f4615lilil1liLi1lLL1l1l) {
x1.Ll1lLl1l1LL1l1Ll("http: " + str, (Throwable) null);
if (hashMap != null) {
for (Map.Entry<String, String> entry : hashMap.entrySet()) {
if (!TextUtils.isEmpty(entry.getKey()) && !TextUtils.isEmpty(entry.getValue())) {
StringBuilder m21Ll1lLl1l1LL1l1Ll = l1L1L1L1L1l1LLL1LL1ll.Ll1lLl1l1LL1l1Ll.Ll1lLl1l1LL1l1Ll.L1Lll1ll1Ll1ll1L.l1L1L1L1L1l1LLL1LL1ll.m21Ll1lLl1l1LL1l1Ll("http headers key:");
m21Ll1lLl1l1LL1l1Ll.append(entry.getKey());
m21Ll1lLl1l1LL1l1Ll.append(" value:");
m21Ll1lLl1l1LL1l1Ll.append(entry.getValue());
x1.Ll1lLl1l1LL1l1Ll(m21Ll1lLl1l1LL1l1Ll.toString(), (Throwable) null);
}
}
}
if (bArr != null) {
StringBuilder m21Ll1lLl1l1LL1l1Ll2 = l1L1L1L1L1l1LLL1LL1ll.Ll1lLl1l1LL1l1Ll.Ll1lLl1l1LL1l1Ll.L1Lll1ll1Ll1ll1L.l1L1L1L1L1l1LLL1LL1ll.m21Ll1lLl1l1LL1l1Ll("http data length:");
m21Ll1lLl1l1LL1l1Ll2.append(bArr.length);
x1.Ll1lLl1l1LL1l1Ll(m21Ll1lLl1l1LL1l1Ll2.toString(), (Throwable) null);
}
}
Ll1lLl1l1LL1l1Ll ll1lLl1l1LL1l1Ll = new Ll1lLl1l1LL1l1Ll();
try {
try {
httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
if (i4 > 0) {
httpURLConnection.setConnectTimeout(i4);
}
if (i2 == 0) {
httpURLConnection.setDoOutput(false);
} else if (i2 == 1) {
httpURLConnection.setDoOutput(true);
} else {
try {
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", (Throwable) null);
} catch (Throwable th2) {
th = th2;
dataOutputStream = null;
inputStream = null;
bufferedReader = inputStream;
try {
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", th);
if (!(th instanceof RangersHttpException)) {
}
} catch (Throwable th3) {
if (dataOutputStream != null) {
try {
dataOutputStream.close();
} catch (IOException unused) {
}
}
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (IOException unused2) {
}
}
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException unused3) {
}
}
if (byteArrayOutputStream != null) {
try {
byteArrayOutputStream.close();
} catch (IOException unused4) {
}
}
throw th3;
}
}
}
httpURLConnection.setRequestMethod(f4599Ll1lLl1l1LL1l1Ll[i2]);
if (hashMap != null && !hashMap.isEmpty()) {
for (Map.Entry<String, String> entry2 : hashMap.entrySet()) {
if (TextUtils.isEmpty(entry2.getKey()) || TextUtils.isEmpty(entry2.getValue())) {
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", (Throwable) null);
} else {
httpURLConnection.addRequestProperty(entry2.getKey(), entry2.getValue());
}
}
}
httpURLConnection.setRequestProperty("Accept-Encoding", "gzip");
if (bArr == null || bArr.length <= 0) {
dataOutputStream = null;
} else {
dataOutputStream = new DataOutputStream(httpURLConnection.getOutputStream());
try {
dataOutputStream.write(bArr);
dataOutputStream.flush();
dataOutputStream.close();
} catch (Throwable th4) {
th = th4;
inputStream = null;
bufferedReader = inputStream;
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", th);
if (!(th instanceof RangersHttpException)) {
}
}
}
responseCode = httpURLConnection.getResponseCode();
} catch (Throwable th5) {
th = th5;
}
} catch (IOException unused5) {
}
if (responseCode == 200) {
if (i3 == 0) {
if (httpURLConnection.getContentLength() >= 10240) {
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", (Throwable) null);
bufferedReader3 = null;
} else {
InputStream inputStream2 = httpURLConnection.getInputStream();
BufferedReader bufferedReader4 = "gzip".equalsIgnoreCase(httpURLConnection.getContentEncoding()) ? new BufferedReader(new InputStreamReader(new GZIPInputStream(inputStream2))) : new BufferedReader(new InputStreamReader(inputStream2));
try {
StringBuilder sb = new StringBuilder(inputStream2.available());
while (true) {
String readLine = bufferedReader4.readLine();
if (readLine == null) {
break;
}
sb.append(readLine);
sb.append("\n");
}
ll1lLl1l1LL1l1Ll.f4603Ll1lLl1l1LL1l1Ll = sb.toString();
JSONObject jSONObject = new JSONObject(ll1lLl1l1LL1l1Ll.f4603Ll1lLl1l1LL1l1Ll);
jSONObject.put("Set-Cookie", httpURLConnection.getHeaderField("Set-Cookie"));
ll1lLl1l1LL1l1Ll.f4603Ll1lLl1l1LL1l1Ll = jSONObject.toString();
bufferedReader3 = bufferedReader4;
} catch (Throwable th6) {
th = th6;
inputStream = null;
bufferedReader = bufferedReader4;
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", th);
if (!(th instanceof RangersHttpException)) {
throw th;
}
if (dataOutputStream != null) {
try {
dataOutputStream.close();
} catch (IOException unused6) {
}
}
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (IOException unused7) {
}
}
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException unused8) {
}
}
if (byteArrayOutputStream != null) {
byteArrayOutputStream.close();
}
return ll1lLl1l1LL1l1Ll;
}
}
inputStream = null;
bufferedReader2 = bufferedReader3;
} else {
inputStream = httpURLConnection.getInputStream();
if ("gzip".equalsIgnoreCase(httpURLConnection.getContentEncoding())) {
inputStream = new GZIPInputStream(inputStream);
}
try {
ByteArrayOutputStream byteArrayOutputStream2 = new ByteArrayOutputStream();
try {
byte[] bArr2 = new byte[1024];
while (true) {
int read = inputStream.read(bArr2);
if (read == -1) {
break;
}
byteArrayOutputStream2.write(bArr2, 0, read);
}
ll1lLl1l1LL1l1Ll.f4604lilil1liLi1lLL1l1l = byteArrayOutputStream2.toByteArray();
bufferedReader2 = null;
byteArrayOutputStream = byteArrayOutputStream2;
} catch (Throwable th7) {
byteArrayOutputStream = byteArrayOutputStream2;
th = th7;
bufferedReader = null;
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", th);
if (!(th instanceof RangersHttpException)) {
}
}
} catch (Throwable th8) {
th = th8;
bufferedReader = null;
}
}
if (dataOutputStream != null) {
try {
dataOutputStream.close();
} catch (IOException unused9) {
}
}
if (bufferedReader2 != null) {
try {
bufferedReader2.close();
} catch (IOException unused10) {
}
}
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException unused11) {
}
}
if (byteArrayOutputStream != null) {
byteArrayOutputStream.close();
}
return ll1lLl1l1LL1l1Ll;
}
throw new RangersHttpException(responseCode, httpURLConnection.getResponseMessage());
}
public static JSONObject Ll1lLl1l1LL1l1Ll(String str, String str2) {
JSONObject jSONObject = new JSONObject();
jSONObject.put("aid", str);
jSONObject.put("os", "Android");
jSONObject.put(ak.y, String.valueOf(Build.VERSION.SDK_INT));
jSONObject.put("sdk_version", "6.2.2");
jSONObject.put("app_version", str2);
return jSONObject;
}
public static void Ll1lLl1l1LL1l1Ll(StringBuilder sb, String str, String str2) {
if (sb == null || TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
return;
}
sb.append(sb.toString().indexOf(63) < 0 ? "?" : RequestEncryptUtils.PARAMETER_SEPARATOR);
sb.append(str);
sb.append(RequestEncryptUtils.NAME_VALUE_SEPARATOR);
sb.append(Uri.encode(str2));
}
public static void Ll1lLl1l1LL1l1Ll(JSONObject jSONObject) {
try {
long optLong = jSONObject.optLong("server_time");
if (optLong > 0) {
JSONObject jSONObject2 = new JSONObject();
jSONObject2.put("server_time", optLong);
jSONObject2.put("local_time", System.currentTimeMillis() / 1000);
f4602lilil1liLi1lLL1l1l = jSONObject2;
}
} catch (Exception unused) {
}
}
public static boolean Ll1lLl1l1LL1l1Ll(int i2) {
return i2 >= 500 && i2 < 600;
}
public static int Ll1lLl1l1LL1l1Ll(String[] strArr, byte[] bArr, q qVar) {
JSONObject jSONObject;
Exception e;
String post;
HashMap<String, String> Ll1lLl1l1LL1l1Ll2 = Ll1lLl1l1LL1l1Ll();
JSONObject jSONObject2 = null;
int i2 = 102;
for (String str : strArr) {
try {
post = AppLog.getNetClient().post(str, bArr, Ll1lLl1l1LL1l1Ll2);
} catch (Exception e2) {
jSONObject = jSONObject2;
e = e2;
}
if (TextUtils.isEmpty(post)) {
continue;
} else {
jSONObject = new JSONObject(post);
try {
Ll1lLl1l1LL1l1Ll(jSONObject);
} catch (Exception e3) {
e = e3;
if (e instanceof RangersHttpException) {
i2 = ((RangersHttpException) e).getResponseCode();
if (qVar.f4514lilil1liLi1lLL1l1l.isCongestionControlEnable() && Ll1lLl1l1LL1l1Ll(i2)) {
jSONObject2 = jSONObject;
if (jSONObject2 != null) {
}
return i2;
}
} else {
x1.Ll1lLl1l1LL1l1Ll("U SHALL NOT PASS!", e);
}
jSONObject2 = jSONObject;
}
if (!"ss_app_log".equals(jSONObject.optString("magic_tag"))) {
jSONObject2 = jSONObject;
i2 = 102;
} else if (bf.o.equals(jSONObject.optString("message"))) {
i2 = 200;
jSONObject2 = jSONObject;
break;
} else {
i2 = 101;
jSONObject2 = jSONObject;
}
}
}
if (jSONObject2 != null) {
if (qVar != null) {
int optInt = jSONObject2.optInt("backoff_ratio", 0);
qVar.L1Ll1ll1L1L1ll1l = optInt;
if (optInt < 0 || optInt > 10000) {
qVar.L1Ll1ll1L1L1ll1l = 0;
}
int i3 = qVar.L1Ll1ll1L1L1ll1l > 0 ? 1 : 27;
int optInt2 = jSONObject2.optInt("max_request_frequency", i3);
qVar.l1llL1Ll1lL1Ll = optInt2;
if (optInt2 < 1 || optInt2 > 27) {
qVar.l1llL1Ll1lL1Ll = i3;
}
if (qVar.L1Ll1ll1L1L1ll1l > 0 && qVar.L1Lll1lll1LlL1L11l == 0) {
qVar.L1Lll1lll1LlL1L11l = System.currentTimeMillis();
qVar.L1Lll1lll1llL = 1;
} else if (qVar.L1Ll1ll1L1L1ll1l == 0) {
qVar.L1Lll1lll1LlL1L11l = 0L;
qVar.L1Lll1lll1llL = 0;
}
qVar.L1Lll1l1l1l1l1l = jSONObject2.optLong("batch_event_interval", 0L) * 1000;
StringBuilder m21Ll1lLl1l1LL1l1Ll = l1L1L1L1L1l1LLL1LL1ll.Ll1lLl1l1LL1l1Ll.Ll1lLl1l1LL1l1Ll.L1Lll1ll1Ll1ll1L.l1L1L1L1L1l1LLL1LL1ll.m21Ll1lLl1l1LL1l1Ll("updateLogRespConfig mBackoffRatio: ");
m21Ll1lLl1l1LL1l1Ll.append(qVar.L1Ll1ll1L1L1ll1l);
m21Ll1lLl1l1LL1l1Ll.append(", mMaxRequestFrequency: ");
m21Ll1lLl1l1LL1l1Ll.append(qVar.l1llL1Ll1lL1Ll);
m21Ll1lLl1l1LL1l1Ll.append(", mBackoffWindowStartTime: ");
m21Ll1lLl1l1LL1l1Ll.append(qVar.L1Lll1lll1LlL1L11l);
m21Ll1lLl1l1LL1l1Ll.append(", mBackoffWindowSendCount: ");
m21Ll1lLl1l1LL1l1Ll.append(qVar.L1Lll1lll1llL);
m21Ll1lLl1l1LL1l1Ll.append(", mEventIntervalFromLogResp: ");
m21Ll1lLl1l1LL1l1Ll.append(qVar.L1Lll1l1l1l1l1l);
x1.Ll1lLl1l1LL1l1Ll(m21Ll1lLl1l1LL1l1Ll.toString(), (Throwable) null);
JSONObject optJSONObject = jSONObject2.optJSONObject("blocklist");
if (optJSONObject != null) {
JSONArray optJSONArray = optJSONObject.optJSONArray("v1");
int length = optJSONArray != null ? optJSONArray.length() : 0;
HashSet hashSet = new HashSet(length);
for (int i4 = 0; i4 < length; i4++) {
String optString = optJSONArray.optString(i4, null);
if (!TextUtils.isEmpty(optString)) {
hashSet.add(optString);
}
}
JSONArray optJSONArray2 = optJSONObject.optJSONArray("v3");
int length2 = optJSONArray2 != null ? optJSONArray2.length() : 0;
HashSet hashSet2 = new HashSet(length2);
for (int i5 = 0; i5 < length2; i5++) {
String optString2 = optJSONArray2.optString(i5, null);
if (!TextUtils.isEmpty(optString2)) {
hashSet2.add(optString2);
}
}
qVar.f4507L1LLLll1llLLl.addAll(hashSet);
qVar.f4512l1Ll1llLLl1ll1l1l1l1l1l.addAll(hashSet2);
}
} else {
throw null;
}
}
return i2;
}
public static boolean Ll1lLl1l1LL1l1Ll(JSONObject jSONObject, String str) {
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("header", AppLog.getHeader());
JSONArray jSONArray = new JSONArray();
if (jSONObject != null) {
jSONArray.put(jSONObject);
}
jSONObject2.put("event_v3", jSONArray);
} catch (JSONException unused) {
}
HashMap<String, String> Ll1lLl1l1LL1l1Ll2 = Ll1lLl1l1LL1l1Ll();
Ll1lLl1l1LL1l1Ll2.put("Cookie", str);
try {
if (!new JSONObject(Ll1lLl1l1LL1l1Ll(1, f4598L1L1l1lL1l1l1Ll11L + "/simulator/mobile/log", Ll1lLl1l1LL1l1Ll2, l1L1L1L1L1l1LLL1LL1ll.Ll1lLl1l1LL1l1Ll.Ll1lLl1l1LL1l1Ll.L1Lll1ll1Ll1ll1L.l1L1L1L1L1l1LLL1LL1ll.Ll1l1L1L1L1l1L1l(jSONObject2.toString()), -1)).getJSONObject("data").getBoolean("keep")) {
AppLog.setRangersEventVerifyEnable(false, str);
}
return true;
} catch (Exception unused2) {
return false;
}
}
}