正在查看: 95爱播免登录版 v3.1.9 应用的 g.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 95爱播免登录版 v3.1.9 应用的 g.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.showself.net;
import android.content.Context;
import android.os.Build;
import android.text.TextUtils;
import com.mifeng.ui.R;
import com.showself.domain.SystemInfo;
import com.showself.ui.ShowSelfApp;
import com.showself.utils.Utils;
import com.showself.utils.t0;
import java.io.File;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpRequestBase;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.entity.mime.MultipartEntity;
import org.apache.http.entity.mime.content.FileBody;
import org.apache.http.entity.mime.content.StringBody;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.util.EntityUtils;
import org.json.JSONException;
import org.json.JSONObject;
public class g {
private static ArrayList<HttpPost> a = new ArrayList<>();
public static String a(String str, File file, File file2, String str2, String str3, String str4) {
String jSONObject;
DefaultHttpClient defaultHttpClient;
String f2 = t0.f(str, str2);
if (!Utils.q0(ShowSelfApp.h().getApplicationContext())) {
JSONObject jSONObject2 = new JSONObject();
JSONObject jSONObject3 = new JSONObject();
try {
jSONObject3.put(e.n1, -1000);
jSONObject3.put(e.o1, ShowSelfApp.h().getResources().getString(2131690476));
jSONObject2.put("status", jSONObject3);
} catch (JSONException e2) {
e2.printStackTrace();
}
return jSONObject2.toString();
}
DefaultHttpClient defaultHttpClient2 = null;
String str5 = null;
defaultHttpClient2 = null;
defaultHttpClient2 = null;
try {
try {
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("https", new d(null), 443));
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
HttpParams params = new DefaultHttpClient().getParams();
params.setParameter(HttpMethodParams.USER_AGENT, com.showself.utils.j.a + "_" + Build.VERSION.RELEASE + "_" + Build.MODEL);
defaultHttpClient = new DefaultHttpClient(new ThreadSafeClientConnManager(params, schemeRegistry), params);
} catch (Throwable th) {
th = th;
defaultHttpClient2.getConnectionManager().shutdown();
throw th;
}
} catch (ConnectTimeoutException e3) {
e = e3;
} catch (Exception e4) {
e = e4;
}
try {
HttpConnectionParams.setConnectionTimeout(defaultHttpClient.getParams(), SystemInfo.getShareSystem().getDefaultTimeOutSeconds() * 1000);
HttpConnectionParams.setSoTimeout(defaultHttpClient.getParams(), SystemInfo.getShareSystem().getDefaultTimeOutSeconds() * 1000);
HttpPost httpPost = new HttpPost(f2);
httpPost.addHeader("Accept-Encoding", "gzip, deflate");
g(httpPost);
HttpPost httpPost2 = httpPost;
MultipartEntity multipartEntity = new MultipartEntity();
if (file != null && file.exists() && file.length() > 0) {
multipartEntity.addPart(str3, new FileBody(file));
}
if (file2 != null && file2.exists() && file2.length() > 0) {
multipartEntity.addPart(str4, new FileBody(file2));
}
multipartEntity.addPart("jsonstr", new StringBody(str2, Charset.forName("UTF-8")));
httpPost2.setEntity(multipartEntity);
HttpResponse execute = defaultHttpClient.execute(httpPost2);
if (execute != null && execute.getStatusLine().getStatusCode() == 200) {
HttpEntity entity = execute.getEntity();
Header contentEncoding = entity.getContentEncoding();
String entityUtils = (contentEncoding == null || !contentEncoding.getValue().equalsIgnoreCase("gzip")) ? EntityUtils.toString(execute.getEntity(), "UTF-8") : EntityUtils.toString(new b(entity));
if (entityUtils != null && !entityUtils.contains("status")) {
entityUtils = com.r.e.a.a(entityUtils, Utils.p());
}
str5 = entityUtils;
} else {
if (execute != null) {
n(execute.getStatusLine().getStatusCode(), "ParamDoubleFile", f2);
HttpEntity entity2 = execute.getEntity();
Header contentEncoding2 = entity2.getContentEncoding();
throw new Exception(execute.getStatusLine().getStatusCode() + " " + ((contentEncoding2 == null || !contentEncoding2.getValue().equalsIgnoreCase("gzip")) ? EntityUtils.toString(execute.getEntity(), "UTF-8") : EntityUtils.toString(new b(entity2))));
}
n(-1000, "ParamDoubleFile", f2);
}
defaultHttpClient.getConnectionManager().shutdown();
return str5;
} catch (ConnectTimeoutException e5) {
e = e5;
defaultHttpClient2 = defaultHttpClient;
m(-1000, e, f2);
e.printStackTrace();
JSONObject jSONObject4 = new JSONObject();
JSONObject jSONObject5 = new JSONObject();
try {
jSONObject5.put(e.n1, -1000);
jSONObject5.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_sotimeout));
jSONObject4.put("status", jSONObject5);
} catch (JSONException e6) {
e6.printStackTrace();
}
jSONObject = jSONObject4.toString();
defaultHttpClient2.getConnectionManager().shutdown();
return jSONObject;
} catch (Exception e7) {
e = e7;
defaultHttpClient2 = defaultHttpClient;
m(-1000, e, f2);
JSONObject jSONObject6 = new JSONObject();
JSONObject jSONObject7 = new JSONObject();
try {
jSONObject7.put(e.n1, -1000);
jSONObject7.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_cannot_use));
jSONObject6.put("status", jSONObject7);
} catch (JSONException e8) {
e8.printStackTrace();
}
jSONObject = jSONObject6.toString();
defaultHttpClient2.getConnectionManager().shutdown();
return jSONObject;
} catch (Throwable th2) {
th = th2;
defaultHttpClient2 = defaultHttpClient;
defaultHttpClient2.getConnectionManager().shutdown();
throw th;
}
}
public static String b(String str, File file, File file2, String str2, String str3, Context context) {
return c(str, file, file2, str2, "jsonstr", str3, context);
}
public static String c(String str, File file, File file2, String str2, String str3, String str4, Context context) {
String jSONObject;
ClientConnectionManager connectionManager;
DefaultHttpClient defaultHttpClient;
HttpPost httpPost;
MultipartEntity multipartEntity;
String str5;
String str6;
String f2 = t0.f(str, str2);
if (!Utils.q0(ShowSelfApp.h().getApplicationContext())) {
JSONObject jSONObject2 = new JSONObject();
JSONObject jSONObject3 = new JSONObject();
try {
jSONObject3.put(e.n1, -1000);
jSONObject3.put(e.o1, ShowSelfApp.h().getResources().getString(2131690476));
jSONObject2.put("status", jSONObject3);
} catch (JSONException e2) {
e2.printStackTrace();
}
return jSONObject2.toString();
}
DefaultHttpClient defaultHttpClient2 = null;
try {
try {
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("https", new d(null), 443));
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
HttpParams params = new DefaultHttpClient().getParams();
params.setParameter(HttpMethodParams.USER_AGENT, com.showself.utils.j.a + "_" + Build.VERSION.RELEASE + "_" + Build.MODEL);
defaultHttpClient = new DefaultHttpClient(new ThreadSafeClientConnManager(params, schemeRegistry), params);
} catch (Throwable th) {
th = th;
defaultHttpClient2.getConnectionManager().shutdown();
throw th;
}
} catch (ConnectTimeoutException e3) {
e = e3;
defaultHttpClient2 = null;
} catch (Exception e4) {
e = e4;
defaultHttpClient2 = null;
} catch (Throwable th2) {
th = th2;
defaultHttpClient2 = null;
}
try {
HttpConnectionParams.setConnectionTimeout(defaultHttpClient.getParams(), SystemInfo.getShareSystem().getDefaultTimeOutSeconds() * 1000);
HttpConnectionParams.setSoTimeout(defaultHttpClient.getParams(), SystemInfo.getShareSystem().getDefaultTimeOutSeconds() * 1000);
HttpPost httpPost2 = new HttpPost(f2);
httpPost2.addHeader("Accept-Encoding", "gzip, deflate");
g(httpPost2);
httpPost = httpPost2;
multipartEntity = new MultipartEntity();
} catch (ConnectTimeoutException e5) {
e = e5;
defaultHttpClient2 = defaultHttpClient;
m(-1000, e, f2);
e.printStackTrace();
JSONObject jSONObject4 = new JSONObject();
JSONObject jSONObject5 = new JSONObject();
try {
jSONObject5.put(e.n1, -1000);
jSONObject5.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_sotimeout));
jSONObject4.put("status", jSONObject5);
} catch (JSONException e6) {
e6.printStackTrace();
}
jSONObject = jSONObject4.toString();
connectionManager = defaultHttpClient2.getConnectionManager();
connectionManager.shutdown();
return jSONObject;
} catch (Exception e7) {
e = e7;
defaultHttpClient2 = defaultHttpClient;
m(-1000, e, f2);
e.printStackTrace();
JSONObject jSONObject6 = new JSONObject();
JSONObject jSONObject7 = new JSONObject();
try {
jSONObject7.put(e.n1, -1000);
jSONObject7.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_cannot_use));
jSONObject6.put("status", jSONObject7);
} catch (JSONException e8) {
e8.printStackTrace();
}
jSONObject = jSONObject6.toString();
connectionManager = defaultHttpClient2.getConnectionManager();
connectionManager.shutdown();
return jSONObject;
} catch (Throwable th3) {
th = th3;
defaultHttpClient2 = defaultHttpClient;
defaultHttpClient2.getConnectionManager().shutdown();
throw th;
}
if (file == null || !file.exists() || file.length() <= 0) {
try {
JSONObject jSONObject8 = new JSONObject();
JSONObject jSONObject9 = new JSONObject();
jSONObject9.put(e.n1, -1000);
jSONObject9.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_get_photo_fail));
jSONObject8.put("status", jSONObject9);
jSONObject = jSONObject8.toString();
connectionManager = defaultHttpClient.getConnectionManager();
connectionManager.shutdown();
return jSONObject;
} catch (JSONException e9) {
e9.printStackTrace();
}
} else {
multipartEntity.addPart(str4, new FileBody(file));
}
if (file2 != null && file2.exists() && file2.length() > 0) {
multipartEntity.addPart("audio", new FileBody(file2));
}
multipartEntity.addPart(str3, new StringBody(com.r.e.a.b(str2, Utils.p()), Charset.forName("UTF-8")));
httpPost.setEntity(multipartEntity);
HttpResponse execute = defaultHttpClient.execute(httpPost);
if (execute != null && execute.getStatusLine().getStatusCode() == 200) {
HttpEntity entity = execute.getEntity();
Header contentEncoding = entity.getContentEncoding();
str5 = (contentEncoding == null || !contentEncoding.getValue().equalsIgnoreCase("gzip")) ? EntityUtils.toString(execute.getEntity(), "UTF-8") : EntityUtils.toString(new b(entity));
if (str5 != null && !str5.contains("status")) {
str5 = com.r.e.a.a(str5, Utils.p());
}
} else {
if (execute != null) {
n(execute.getStatusLine().getStatusCode(), "ParamFile", f2);
HttpEntity entity2 = execute.getEntity();
Header contentEncoding2 = entity2.getContentEncoding();
throw new Exception(execute.getStatusLine().getStatusCode() + " " + ((contentEncoding2 == null || !contentEncoding2.getValue().equalsIgnoreCase("gzip")) ? EntityUtils.toString(execute.getEntity(), "UTF-8") : EntityUtils.toString(new b(entity2))));
}
n(-1000, "ParamFile", f2);
str5 = null;
}
defaultHttpClient.getConnectionManager().shutdown();
try {
new JSONObject(str5);
} catch (Exception e10) {
JSONObject jSONObject10 = new JSONObject();
JSONObject jSONObject11 = new JSONObject();
try {
jSONObject11.put(e.n1, -1000);
jSONObject11.put(e.o1, ShowSelfApp.h().getResources().getString(2131690476));
jSONObject10.put("status", jSONObject11);
str6 = jSONObject10.toString();
} catch (JSONException e11) {
e11.printStackTrace();
str6 = null;
}
e10.printStackTrace();
str5 = str6;
}
com.sjnet.i.d.a.b.b(str5);
return str5;
}
public static String d(String str, File file, String str2, String str3) {
String jSONObject;
ClientConnectionManager connectionManager;
DefaultHttpClient defaultHttpClient;
HttpPost httpPost;
MultipartEntity multipartEntity;
String str4;
if (!Utils.q0(ShowSelfApp.h().getApplicationContext())) {
JSONObject jSONObject2 = new JSONObject();
JSONObject jSONObject3 = new JSONObject();
try {
jSONObject3.put(e.n1, -1000);
jSONObject3.put(e.o1, ShowSelfApp.h().getResources().getString(2131690476));
jSONObject2.put("status", jSONObject3);
} catch (JSONException e2) {
e2.printStackTrace();
}
return jSONObject2.toString();
}
DefaultHttpClient defaultHttpClient2 = null;
String str5 = null;
defaultHttpClient2 = null;
defaultHttpClient2 = null;
try {
try {
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("https", new d(null), 443));
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
HttpParams params = new DefaultHttpClient().getParams();
params.setParameter(HttpMethodParams.USER_AGENT, com.showself.utils.j.a + "_" + Build.VERSION.RELEASE + "_" + Build.MODEL);
defaultHttpClient = new DefaultHttpClient(new ThreadSafeClientConnManager(params, schemeRegistry), params);
} catch (Throwable th) {
th = th;
defaultHttpClient2.getConnectionManager().shutdown();
throw th;
}
} catch (ConnectTimeoutException e3) {
e = e3;
} catch (Exception e4) {
e = e4;
}
try {
HttpConnectionParams.setConnectionTimeout(defaultHttpClient.getParams(), SystemInfo.getShareSystem().getDefaultTimeOutSeconds() * 1000);
HttpConnectionParams.setSoTimeout(defaultHttpClient.getParams(), SystemInfo.getShareSystem().getDefaultTimeOutSeconds() * 1000);
HttpPost httpPost2 = new HttpPost(str);
httpPost2.addHeader("Accept-Encoding", "gzip, deflate");
g(httpPost2);
httpPost = httpPost2;
multipartEntity = new MultipartEntity();
} catch (ConnectTimeoutException e5) {
e = e5;
defaultHttpClient2 = defaultHttpClient;
e.printStackTrace();
JSONObject jSONObject4 = new JSONObject();
JSONObject jSONObject5 = new JSONObject();
try {
jSONObject5.put(e.n1, -1000);
jSONObject5.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_sotimeout));
jSONObject4.put("status", jSONObject5);
} catch (JSONException e6) {
e6.printStackTrace();
}
jSONObject = jSONObject4.toString();
connectionManager = defaultHttpClient2.getConnectionManager();
connectionManager.shutdown();
return jSONObject;
} catch (Exception e7) {
e = e7;
defaultHttpClient2 = defaultHttpClient;
e.printStackTrace();
JSONObject jSONObject6 = new JSONObject();
JSONObject jSONObject7 = new JSONObject();
try {
jSONObject7.put(e.n1, -1000);
jSONObject7.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_cannot_use));
jSONObject6.put("status", jSONObject7);
} catch (JSONException e8) {
e8.printStackTrace();
}
jSONObject = jSONObject6.toString();
connectionManager = defaultHttpClient2.getConnectionManager();
connectionManager.shutdown();
return jSONObject;
} catch (Throwable th2) {
th = th2;
defaultHttpClient2 = defaultHttpClient;
defaultHttpClient2.getConnectionManager().shutdown();
throw th;
}
if (file == null || !file.exists() || file.length() <= 0) {
try {
JSONObject jSONObject8 = new JSONObject();
JSONObject jSONObject9 = new JSONObject();
jSONObject9.put(e.n1, -1000);
jSONObject9.put(e.o1, ShowSelfApp.h().getResources().getString(R.string.network_get_photo_fail));
jSONObject8.put("status", jSONObject9);
jSONObject = jSONObject8.toString();
connectionManager = defaultHttpClient.getConnectionManager();
connectionManager.shutdown();
return jSONObject;
} catch (JSONException e9) {
e9.printStackTrace();
}
} else {
multipartEntity.addPart(str2, new FileBody(file));
}
if (!TextUtils.isEmpty(str3)) {
multipartEntity.addPart("data", new StringBody(str3, Charset.forName("UTF-8")));
}
httpPost.setEntity(multipartEntity);
HttpResponse execute = defaultHttpClient.execute(httpPost);
if (execute != null && execute.getStatusLine().getStatusCode() == 200) {
HttpEntity entity = execute.getEntity();
Header contentEncoding = entity.getContentEncoding();
str4 = (contentEncoding == null || !contentEncoding.getValue().equalsIgnoreCase("gzip")) ? EntityUtils.toString(execute.getEntity(), "UTF-8") : EntityUtils.toString(new b(entity));
} else {
if (execute != null) {
HttpEntity entity2 = execute.getEntity();
Header contentEncoding2 = entity2.getContentEncoding();
throw new Exception(execute.getStatusLine().getStatusCode() + " " + ((contentEncoding2 == null || !contentEncoding2.getValue().equalsIgnoreCase("gzip")) ? EntityUtils.toString(execute.getEntity(), "UTF-8") : EntityUtils.toString(new b(entity2))));
}
str4 = null;
}
defaultHttpClient.getConnectionManager().shutdown();
try {
new JSONObject(str4);
} catch (Exception e10) {
JSONObject jSONObject10 = new JSONObject();
JSONObject jSONObject11 = new JSONObject();
try {
jSONObject11.put(e.n1, -1000);
jSONObject11.put(e.o1, ShowSelfApp.h().getResources().getString(2131690476));
jSONObject10.put("status", jSONObject11);
str5 = jSONObject10.toString();
} catch (JSONException e11) {
e11.printStackTrace();
}
e10.printStackTrace();
str4 = str5;
}
com.sjnet.i.d.a.b.b(str4);
return str4;
}
public static String e(String str, String str2) {
return f(str, str2, PostMethod.FORM_URL_ENCODED_CONTENT_TYPE, true);
}
public static java.lang.String f(java.lang.String r10, java.lang.String r11, java.lang.String r12, boolean r13) {
throw new UnsupportedOperationException("Method not decompiled: com.showself.net.g.f(java.lang.String, java.lang.String, java.lang.String, boolean):java.lang.String");
}
private static HttpRequestBase g(HttpRequestBase httpRequestBase) {
HashMap<String, String> f2 = com.sjnet.i.d.a.b.f();
if (f2 != null) {
for (Map.Entry<String, String> entry : f2.entrySet()) {
httpRequestBase.addHeader(entry.getKey(), entry.getValue());
}
}
return httpRequestBase;
}
public static java.lang.String h(java.lang.String r11, java.io.File r12, java.lang.String r13) {
throw new UnsupportedOperationException("Method not decompiled: com.showself.net.g.h(java.lang.String, java.io.File, java.lang.String):java.lang.String");
}
public static String i(String str) {
DefaultHttpClient defaultHttpClient;
HttpClient httpClient;
HttpResponse execute;
String e2 = t0.e(str);
HttpClient httpClient2 = null;
try {
try {
SchemeRegistry schemeRegistry = new SchemeRegistry();
schemeRegistry.register(new Scheme("https", new d(null), 443));
schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
HttpParams params = new DefaultHttpClient().getParams();
defaultHttpClient = new DefaultHttpClient(new ThreadSafeClientConnManager(params, schemeRegistry), params);
try {
HttpGet httpGet = new HttpGet(e2);
g(httpGet);
execute = defaultHttpClient.execute(httpGet);
} catch (Exception e3) {
e = e3;
e.printStackTrace();
m(-1000, e, e2);
defaultHttpClient.getConnectionManager().shutdown();
return null;
}
} catch (Throwable th) {
th = th;
httpClient2 = httpClient;
httpClient2.getConnectionManager().shutdown();
throw th;
}
} catch (Exception e4) {
e = e4;
defaultHttpClient = null;
} catch (Throwable th2) {
th = th2;
httpClient2.getConnectionManager().shutdown();
throw th;
}
if (execute == null || execute.getStatusLine().getStatusCode() != 200) {
if (execute != null) {
n(execute.getStatusLine().getStatusCode(), "getHttp", e2);
} else {
n(-1000, "getHttp", e2);
}
defaultHttpClient.getConnectionManager().shutdown();
return null;
}
String entityUtils = EntityUtils.toString(execute.getEntity(), "UTF-8");
if (entityUtils != null && !entityUtils.contains("status")) {
entityUtils = com.r.e.a.a(entityUtils, Utils.p());
}
if (entityUtils != null && !entityUtils.contains("status")) {
entityUtils = com.r.e.a.a(entityUtils, Utils.p());
}
com.sjnet.i.d.a.b.b(entityUtils);
defaultHttpClient.getConnectionManager().shutdown();
return entityUtils;
}
public static String j(String str, String str2) {
return f(str, str2, "application/json", true);
}
public static String k(String str, String str2) {
return l(str, str2, "application/json", true);
}
public static java.lang.String l(java.lang.String r10, java.lang.String r11, java.lang.String r12, boolean r13) {
throw new UnsupportedOperationException("Method not decompiled: com.showself.net.g.l(java.lang.String, java.lang.String, java.lang.String, boolean):java.lang.String");
}
public static void m(int i2, Exception exc, String str) {
if (exc != null) {
n(i2, exc.getMessage(), str);
}
}
public static void n(int i2, String str, String str2) {
com.p.a.b.n(i2, str, str2, "PostParam");
}
}