OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.excelliance.staticslio.b;
import android.content.Context;
import android.text.TextUtils;
import com.excelliance.staticslio.StatisticsManager;
import com.excelliance.staticslio.a.h;
import com.excelliance.staticslio.i.i;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.MalformedURLException;
import java.net.Proxy;
import java.net.URL;
import org.apache.http.client.utils.URLEncodedUtils;
public abstract class a {
public static String c = "http://statis.multiopen.cn/functiondata.php";
public static String d = "http://10.0.0.117:8019/userdata.php";
public static String e = "http://statis.multiopen.cn/userdata.php";
public static String f = "http://statis.multiopen.cn/newuser.php";
public static String g = "http://10.0.0.95:8007/multiaddata.php";
public static String h = "http://statis.multiopen.cn/multiaddata.php";
public static String i = "http://statis.multiopen.cn/daBehaveCount.php";
protected HttpURLConnection f15291a;
protected Context f15292b;
private boolean j = false;
public abstract void c(com.excelliance.staticslio.a.b bVar) throws Throwable;
public static String a(String str) {
c = a(c, str);
return c;
}
private static String a(String str, String str2) {
int indexOf;
int indexOf2;
String replace;
i.b("BaseConnectHandle", "replaceDomainName: start = " + str + ", " + str2);
if (!TextUtils.isEmpty(str)) {
try {
indexOf = str.indexOf("://");
String substring = str.substring(indexOf + 3);
i.b("BaseConnectHandle", "replaceDomainName tempUrl = " + substring);
indexOf2 = substring.indexOf("/");
replace = str.replace(substring.substring(0, indexOf2), str2);
} catch (Exception e2) {
e = e2;
}
try {
i.b("BaseConnectHandle", "replaceDomainName: handle = " + indexOf + ", " + indexOf2);
str = replace;
} catch (Exception e3) {
e = e3;
str = replace;
e.printStackTrace();
i.b("BaseConnectHandle", "replaceDomainName: end = " + str);
return str;
}
}
i.b("BaseConnectHandle", "replaceDomainName: end = " + str);
return str;
}
public static String b(String str) {
e = a(e, str);
return e;
}
public static String c(String str) {
f = a(f, str);
return f;
}
public static String d(String str) {
h = a(h, str);
return h;
}
public static String e(String str) {
i = a(i, str);
return i;
}
public void a(com.excelliance.staticslio.a.b bVar) {
if (2 == a(bVar.f(), bVar.e(), bVar instanceof h ? (h) bVar : null)) {
return;
}
try {
c(bVar);
} catch (Throwable unused) {
bVar.c(2);
}
}
public StringBuilder b(com.excelliance.staticslio.a.b bVar) throws Throwable {
StringBuilder sb = new StringBuilder(bVar.e());
for (com.excelliance.staticslio.a.b d2 = bVar.d(); d2 != null && d2.e() != null; d2 = d2.d()) {
sb.append("\r\n");
sb.append(d2.e());
}
return sb;
}
public a(Context context) {
this.f15292b = context;
}
public boolean a() {
return this.j;
}
public int a(int i2, String str, h hVar) {
boolean z;
Proxy proxy;
String str2;
boolean z2;
HttpURLConnection httpURLConnection;
Proxy proxy2;
if (hVar != null) {
try {
try {
if (hVar.g()) {
z = true;
StatisticsManager.getInstance(this.f15292b);
proxy = null;
if (!StatisticsManager.getDebugMode()) {
if (i2 == 19) {
str2 = d;
this.j = true;
} else if (i2 < 1000) {
str2 = "http://10.0.0.117:8019/functiondata.php";
} else if (i2 <= 1000) {
str2 = null;
} else if (z) {
str2 = i;
} else {
str2 = g;
}
if (i.a()) {
i.b("BaseConnectHandle", "debug build:" + str2);
}
} else {
if (i2 != 19 && i2 != 18) {
if (i2 < 1000) {
str2 = c;
if (i.a()) {
i.b("BaseConnectHandle", "non-basic protocol:" + str2);
}
} else if (i2 > 1000) {
if (z) {
str2 = i;
} else {
str2 = h;
}
if (i.a()) {
i.b("BaseConnectHandle", "av protocol:" + str2);
}
} else {
str2 = null;
}
}
str2 = e;
if (i.a()) {
i.b("BaseConnectHandle", "basic protocol:" + str2);
}
}
if (i.a(this.f15292b) && i.b(this.f15292b) != 1) {
try {
if (i.b(this.f15292b) != 2) {
proxy2 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(android.net.Proxy.getDefaultHost(), android.net.Proxy.getDefaultPort()));
} else {
proxy2 = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(i.c(this.f15292b), i.d(this.f15292b)));
}
proxy = proxy2;
} catch (Exception unused) {
}
}
if (!this.j && !TextUtils.equals(e, str2) && !z) {
z2 = false;
this.j = z2;
StringBuilder sb = new StringBuilder();
sb.append(str2);
sb.append(!a() ? "?ver=2" : "");
URL url = new URL(sb.toString());
i.b("BaseConnectHandle", url.toString() + "\t" + a());
if (proxy == null) {
httpURLConnection = (HttpURLConnection) url.openConnection(proxy);
} else {
httpURLConnection = (HttpURLConnection) url.openConnection();
}
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setUseCaches(false);
httpURLConnection.setInstanceFollowRedirects(true);
httpURLConnection.setConnectTimeout(30000);
httpURLConnection.setReadTimeout(30000);
httpURLConnection.setRequestProperty("Content-Type", URLEncodedUtils.CONTENT_TYPE);
this.f15291a = httpURLConnection;
return 0;
}
z2 = true;
this.j = z2;
StringBuilder sb2 = new StringBuilder();
sb2.append(str2);
sb2.append(!a() ? "?ver=2" : "");
URL url2 = new URL(sb2.toString());
i.b("BaseConnectHandle", url2.toString() + "\t" + a());
if (proxy == null) {
}
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setUseCaches(false);
httpURLConnection.setInstanceFollowRedirects(true);
httpURLConnection.setConnectTimeout(30000);
httpURLConnection.setReadTimeout(30000);
httpURLConnection.setRequestProperty("Content-Type", URLEncodedUtils.CONTENT_TYPE);
this.f15291a = httpURLConnection;
return 0;
}
} catch (MalformedURLException unused2) {
return 2;
}
} catch (Exception e2) {
e2.printStackTrace();
return 1;
}
}
z = false;
StatisticsManager.getInstance(this.f15292b);
proxy = null;
if (!StatisticsManager.getDebugMode()) {
}
if (i.a(this.f15292b)) {
if (i.b(this.f15292b) != 2) {
}
proxy = proxy2;
}
if (!this.j) {
z2 = false;
this.j = z2;
StringBuilder sb22 = new StringBuilder();
sb22.append(str2);
sb22.append(!a() ? "?ver=2" : "");
URL url22 = new URL(sb22.toString());
i.b("BaseConnectHandle", url22.toString() + "\t" + a());
if (proxy == null) {
}
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setUseCaches(false);
httpURLConnection.setInstanceFollowRedirects(true);
httpURLConnection.setConnectTimeout(30000);
httpURLConnection.setReadTimeout(30000);
httpURLConnection.setRequestProperty("Content-Type", URLEncodedUtils.CONTENT_TYPE);
this.f15291a = httpURLConnection;
return 0;
}
z2 = true;
this.j = z2;
StringBuilder sb222 = new StringBuilder();
sb222.append(str2);
sb222.append(!a() ? "?ver=2" : "");
URL url222 = new URL(sb222.toString());
i.b("BaseConnectHandle", url222.toString() + "\t" + a());
if (proxy == null) {
}
httpURLConnection.setDoOutput(true);
httpURLConnection.setDoInput(true);
httpURLConnection.setRequestMethod("POST");
httpURLConnection.setUseCaches(false);
httpURLConnection.setInstanceFollowRedirects(true);
httpURLConnection.setConnectTimeout(30000);
httpURLConnection.setReadTimeout(30000);
httpURLConnection.setRequestProperty("Content-Type", URLEncodedUtils.CONTENT_TYPE);
this.f15291a = httpURLConnection;
return 0;
}
}