新浪彩票 v0.96.37版本的 MD5 值为:0c7ddce345383506e2959f5d75bdceab
以下内容为反编译后的 C4331.java 源代码,内容仅作参考
package ewUlBWKNoApzb1Mnhgn4.ZB1GY7mGzn6rcZDnMVLb.tuTnrQl15gwcjciRsKuT.ewUlBWKNoApzb1Mnhgn4;
import android.util.Pair;
import com.tencent.smtt.sdk.TbsReaderView;
import java.io.BufferedReader;
import java.io.Closeable;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.protocol.HTTP;
import org.json.JSONArray;
import org.json.JSONObject;
public final class C4331 {
private static Pair<Integer, String> m20420(String str, String str2, Map<String, String> map) {
InputStream inputStream;
DataOutputStream dataOutputStream;
String message;
InputStream inputStream2;
HttpURLConnection httpURLConnection = null;
int i = -1;
try {
HttpURLConnection httpURLConnection2 = (HttpURLConnection) new URL(str).openConnection();
try {
httpURLConnection2.setRequestMethod(HttpPost.METHOD_NAME);
httpURLConnection2.setDoOutput(true);
httpURLConnection2.setDoInput(true);
httpURLConnection2.setUseCaches(false);
httpURLConnection2.setRequestProperty(HTTP.CONTENT_TYPE, URLEncodedUtils.CONTENT_TYPE);
m20422(httpURLConnection2, map);
httpURLConnection2.setConnectTimeout(TbsReaderView.ReaderCallback.GET_BAR_ANIMATING);
httpURLConnection2.setReadTimeout(TbsReaderView.ReaderCallback.GET_BAR_ANIMATING);
httpURLConnection2.connect();
byte[] bytes = str2.getBytes("UTF-8");
dataOutputStream = new DataOutputStream(httpURLConnection2.getOutputStream());
try {
dataOutputStream.write(bytes);
dataOutputStream.flush();
dataOutputStream.close();
i = httpURLConnection2.getResponseCode();
if (i >= 400) {
inputStream2 = httpURLConnection2.getErrorStream();
} else {
inputStream2 = httpURLConnection2.getInputStream();
}
} catch (Throwable th) {
th = th;
httpURLConnection = httpURLConnection2;
inputStream = null;
}
} catch (Throwable th2) {
th = th2;
dataOutputStream = null;
httpURLConnection = httpURLConnection2;
inputStream = null;
}
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream2, "UTF-8"));
StringBuilder sb = new StringBuilder();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
sb.append(readLine);
sb.append("\r\n");
}
bufferedReader.close();
message = sb.toString();
m20423(null);
m20423(inputStream2);
if (httpURLConnection2 != null) {
httpURLConnection2.disconnect();
}
} catch (Throwable th3) {
httpURLConnection = httpURLConnection2;
inputStream = inputStream2;
th = th3;
dataOutputStream = null;
try {
C4311.m20327(th);
message = th.getMessage();
return new Pair<>(Integer.valueOf(i), message);
} finally {
m20423(dataOutputStream);
m20423(inputStream);
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
}
}
} catch (Throwable th4) {
th = th4;
inputStream = null;
dataOutputStream = null;
}
return new Pair<>(Integer.valueOf(i), message);
}
public static Pair<Integer, String> m20421(List<String> list) {
try {
HashMap hashMap = new HashMap();
hashMap.put("Atta-Type", "batch-report");
JSONObject jSONObject = new JSONObject();
jSONObject.put("attaid", "0d000062340").put("token", "2273782735").put("type", "batch").put("version", "v1.0.0");
JSONArray jSONArray = new JSONArray();
for (String str : list) {
jSONArray.put(str);
}
jSONObject.put("datas", jSONArray);
return m20420("https://h.trace.qq.com/kv", jSONObject.toString(), hashMap);
} catch (Throwable th) {
C4311.m20327(th);
return new Pair<>(-1, th.getMessage());
}
}
private static void m20422(HttpURLConnection httpURLConnection, Map<String, String> map) {
if (httpURLConnection == null || map == null || map.isEmpty()) {
return;
}
for (Map.Entry<String, String> entry : map.entrySet()) {
httpURLConnection.setRequestProperty(entry.getKey(), entry.getValue());
}
}
private static void m20423(Closeable closeable) {
if (closeable == null) {
return;
}
try {
closeable.close();
} catch (Exception e) {
C4311.m20327(e);
}
}
}