Created
September 1, 2019 21:18
-
-
Save l0gicgate/18f5745a4ce93ed81e8739720b1c5d89 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ss.sys.ces.d; | |
import android.content.Context; | |
import com.ss.sys.ces.utils.NetInterface; | |
import java.io.IOException; | |
import java.security.SecureRandom; | |
import java.security.cert.X509Certificate; | |
import java.util.concurrent.TimeUnit; | |
import javax.net.ssl.HostnameVerifier; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.SSLSession; | |
import javax.net.ssl.TrustManager; | |
import javax.net.ssl.X509TrustManager; | |
import okhttp3.Call; | |
import okhttp3.Callback; | |
import okhttp3.p; | |
import okhttp3.r; | |
import okhttp3.u; | |
import okhttp3.v; | |
import okhttp3.w; | |
public abstract class a { | |
class com.ss.sys.ces.d.a$a implements HostnameVerifier { | |
com.ss.sys.ces.d.a$a(com.ss.sys.ces.d.a$1 arg1) { | |
this(); | |
} | |
private com.ss.sys.ces.d.a$a() { | |
super(); | |
} | |
public boolean verify(String arg1, SSLSession arg2) { | |
return 1; | |
} | |
} | |
class b implements X509TrustManager { | |
b(com.ss.sys.ces.d.a$1 arg1) { | |
this(); | |
} | |
private b() { | |
super(); | |
} | |
public void checkClientTrusted(X509Certificate[] arg1, String arg2) { | |
} | |
public void checkServerTrusted(X509Certificate[] arg1, String arg2) { | |
} | |
public X509Certificate[] getAcceptedIssuers() { | |
return new X509Certificate[0]; | |
} | |
} | |
public Context a; | |
public String b; | |
public static final p c = null; | |
public static final p d = null; | |
private static final String e = "a"; | |
private String f; | |
private r g; | |
private String h; | |
private NetInterface i; | |
static { | |
a.c = p.parse("application/json; charset=utf-8"); | |
a.d = p.parse("application/octet-stream"); | |
} | |
public a(Context arg2, String arg3, NetInterface arg4) { | |
super(); | |
this.b = ""; | |
this.f = "TLS"; | |
this.h = ""; | |
this.a = arg2; | |
this.h = arg3; | |
this.i = arg4; | |
this.b(); | |
} | |
public String a() { | |
String v1; | |
String v0 = "?os=0&ver=0.6.02.17&m=1"; | |
try { | |
v1 = this.a.getPackageManager().getPackageInfo(this.a.getPackageName(), 0).versionName; | |
goto label_10; | |
} | |
catch(Exception ) { | |
label_10: | |
v0 = v0 + "&app_ver=" + v1; | |
v0 = v0 + "®ion=" + this.a.getResources().getConfiguration().locale.getCountry(); | |
v0 = v0 + "&aid=" + com.ss.sys.ces.b.e; | |
return v0 + "&did=" + com.ss.sys.ces.b.b; | |
} | |
} | |
public void a(String arg3, String arg4, byte[] arg5) { | |
p v3_2; | |
StringBuilder v5; | |
okhttp3.u$a v3_1; | |
__monitor_enter(this); | |
v v0 = null; | |
try { | |
if(arg3.equalsIgnoreCase("GET")) { | |
v3_1 = new okhttp3.u$a(); | |
v5 = new StringBuilder(); | |
v5.append("sessionid="); | |
v5.append(this.h); | |
v3_1 = v3_1.addHeader("Cookie", v5.toString()).url(this.b); | |
} | |
else { | |
if(arg4.equalsIgnoreCase("STREAM")) { | |
v3_2 = a.d; | |
goto label_24; | |
} | |
else if(arg4.equalsIgnoreCase("JSON")) { | |
v3_2 = a.c; | |
label_24: | |
v0 = v.create(v3_2, arg5); | |
} | |
v3_1 = new okhttp3.u$a(); | |
v5 = new StringBuilder(); | |
v5.append("sessionid="); | |
v5.append(this.h); | |
v3_1 = v3_1.addHeader("Cookie", v5.toString()).url(this.b).post(v0); | |
} | |
u v3_3 = v3_1.build(); | |
this.g.newCall(v3_3).enqueue(new Callback() { | |
public void onFailure(Call arg1, IOException arg2) { | |
} | |
public void onResponse(Call arg1, w arg2) { | |
try { | |
this.a.a(arg2.body().bytes()); | |
return; | |
} | |
catch(Throwable ) { | |
return; | |
} | |
} | |
}); | |
goto label_55; | |
} | |
catch(Throwable ) { | |
label_55: | |
__monitor_exit(this); | |
return; | |
} | |
catch(Throwable v3) { | |
__monitor_exit(this); | |
throw v3; | |
} | |
} | |
public abstract boolean a(byte[] arg1); | |
private void b() { | |
okhttp3.r$a v0 = new okhttp3.r$a(); | |
try { | |
v0.hostnameVerifier(new com.ss.sys.ces.d.a$a(null)); | |
SSLContext v1 = SSLContext.getInstance(this.f); | |
v1.init(null, new TrustManager[]{new b(null)}, new SecureRandom()); | |
v0.sslSocketFactory(v1.getSocketFactory()); | |
goto label_19; | |
} | |
catch(Exception ) { | |
label_19: | |
this.g = v0.connectTimeout(10, TimeUnit.SECONDS).readTimeout(10, TimeUnit.SECONDS).build(); | |
return; | |
} | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ss.sys.ces.d; | |
import android.content.Context; | |
import com.ss.sys.ces.b; | |
import com.ss.sys.ces.utils.NetInterface; | |
public class f extends a { | |
public int e; | |
private static String f = "CZL_JAVA"; | |
static { | |
} | |
public f(Context arg1, String arg2, NetInterface arg3, long arg4) { | |
super(arg1, arg2, arg3); | |
this.b = c.a() + "/v2/r" + this.a(); | |
} | |
public boolean a(byte[] arg3) { | |
if(arg3 != null) { | |
try { | |
b.g = new String(com.ss.sys.ces.a.d(arg3)).equals("") ^ 1; | |
return 1; | |
} | |
catch(Throwable ) { | |
return 1; | |
} | |
} | |
return 1; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment