正在查看: 万能钥匙 v1.1.23 应用的 gs.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 万能钥匙 v1.1.23 应用的 gs.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package cn.fly.verify;
import com.baidu.location.LocationClientOption;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.Charset;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.conn.ssl.X509HostnameVerifier;
public class gs {
public static int f8838a = 0;
public static int f8839b = 0;
private static boolean f8840d = true;
protected boolean f8841c = f8840d;
public static class a {
public int f8847a;
public int f8848b;
}
public static class b implements InvocationHandler {
private Object f8849a;
private String f8850b;
private b(String str) {
try {
this.f8850b = str;
Method declaredMethod = Class.forName(co.a("033[jiKf%ff'f=gehfHghkFhfhjhjCi5hfgmflfihj+k%je fgfFgg[h@flhn fekTgfflfm")).getDeclaredMethod(co.a("011=gg4hkTgkRgOhjAkfgeh"), String.class);
declaredMethod.setAccessible(true);
Object invoke = declaredMethod.invoke(null, co.a("004Vihjkhijl"));
Method method = invoke.getClass().getMethod(co.a("004)fk8gDfkSk"), Class.forName(co.a("022YjiBf%ff^f$hfhj4he]fiflfkCkCfmhfke-h7fmgl-kQgfflMh")));
method.setAccessible(true);
method.invoke(invoke, null);
Method method2 = invoke.getClass().getMethod(co.a("016Ugg!hkLgmflfihjSkLje2fgfIggUh5flhj"), new Class[0]);
method2.setAccessible(true);
Object[] objArr = (Object[]) method2.invoke(invoke, new Object[0]);
if (objArr == null || objArr.length == 0) {
throw new NoSuchAlgorithmException("no trust manager found.");
}
this.f8849a = objArr[0];
} catch (Exception e10) {
ft.a().a("failed to initialize the standard trust manager: " + e10.getMessage(), new Object[0]);
this.f8849a = null;
}
}
@Override
public Object invoke(Object obj, Method method, Object[] objArr) throws Throwable {
String name = method.getName();
if (name.equals(co.a("018ejheZfnim0i)fk!hgkVgmflfihjKkh@fe"))) {
return null;
}
try {
if (!name.equals(co.a("018ejheJfnglFh%flff4h+flgmflfihjKkh_fe"))) {
if (name.equals(co.a("018Vgg=hk9gn*eehlkh.fegkhjhjfiZhWflhj"))) {
return Array.newInstance(Class.forName(co.a("034XjiZf)ff5fShfhj@he8fiflfk0k)fmhfHehCflTk hfihjkhijlimGhRflBk-fkghfk[efkh")), 0);
}
if (name.equals(co.a("008jfWhjOj-imgffe,h"))) {
return Integer.valueOf(hashCode());
}
if (name.equals("toString")) {
return toString();
}
return null;
}
Object[] objArr2 = (Object[]) objArr[0];
String str = (String) objArr[1];
if (objArr2 == null) {
throw new IllegalArgumentException("there were no certificates.");
}
if (objArr2.length == 1) {
Method declaredMethod = objArr2[0].getClass().getDeclaredMethod(co.a("013ejheZfnil]fiFfkfefk@k2fm"), new Class[0]);
declaredMethod.setAccessible(true);
declaredMethod.invoke(objArr2[0], new Object[0]);
return null;
}
if (this.f8849a == null) {
throw new CertificateException("there were one more certificates but no trust manager found.");
}
Object newInstance = Class.forName("android.net.http.X509TrustManagerExtensions").getConstructor(Class.forName(co.a("030.ji_f[ff<fYgehf!ghk+hfhjhj_iQhfihjkhijlgmflfihjAkYjeAfgf ggKhDfl"))).newInstance(this.f8849a);
Method declaredMethod2 = newInstance.getClass().getDeclaredMethod(co.a("018ejhe0fngl'hCflff*hJflgmflfihj*khGfe"), Array.newInstance(Class.forName(co.a("034FjiKf$ffVfIhfhj^he]fiflfkWk1fmhfJeh flVk?hfihjkhijlim4hQflNkLfkghfkYefkh")), 0).getClass(), String.class, String.class);
declaredMethod2.setAccessible(true);
declaredMethod2.invoke(newInstance, objArr2, str, this.f8850b);
return null;
} catch (Throwable th) {
ft.a().c(th);
return null;
}
}
}
public static Object a(String str) throws Throwable {
Class<?> cls = Class.forName(co.a("030:jiVf?ff0f(gehf]ghkNhfhjhj-i.hfihjkhijlgmflfihjMkVjeFfgfBggWh<fl"));
return Proxy.newProxyInstance(ClassLoader.getSystemClassLoader(), new Class[]{cls}, new b(str));
}
private String a(HashMap<String, Object> hashMap) throws Throwable {
StringBuilder sb2 = new StringBuilder();
for (Map.Entry<String, Object> entry : hashMap.entrySet()) {
String c10 = gy.c(entry.getKey(), "utf-8");
String c11 = entry.getValue() == null ? BuildConfig.FLAVOR : gy.c(String.valueOf(entry.getValue()), "utf-8");
if (sb2.length() > 0) {
sb2.append('&');
}
sb2.append(c10);
sb2.append('=');
sb2.append(c11);
}
return sb2.toString();
}
private HttpURLConnection a(String str, a aVar) throws Throwable {
Object obj;
boolean z;
HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
String a10 = co.a("012.fh6hkj(gffegmgffnKhgHhj");
try {
obj = hf.a(httpURLConnection, a10);
} catch (Throwable unused) {
obj = null;
}
if (obj == null) {
a10 = "PERMITTED_USER_METHODS";
try {
obj = hf.c("HttpURLConnection", "PERMITTED_USER_METHODS");
} catch (Throwable unused2) {
}
z = true;
} else {
z = false;
}
if (obj != null) {
String[] strArr = (String[]) obj;
String[] strArr2 = new String[strArr.length + 1];
System.arraycopy(strArr, 0, strArr2, 0, strArr.length);
strArr2[strArr.length] = co.a("005Hingngmimhl");
if (z) {
hf.a("HttpURLConnection", a10, (Object) strArr2);
} else {
hf.b(httpURLConnection, a10, strArr2);
}
}
System.setProperty("http.keepAlive", "false");
if (httpURLConnection instanceof HttpsURLConnection) {
X509HostnameVerifier x509HostnameVerifier = SSLSocketFactory.STRICT_HOSTNAME_VERIFIER;
HttpsURLConnection httpsURLConnection = (HttpsURLConnection) httpURLConnection;
SSLContext sSLContext = SSLContext.getInstance(co.a("003Tgmhegl"));
TrustManager[] trustManagerArr = new TrustManager[0];
try {
trustManagerArr = new TrustManager[]{(TrustManager) a(httpsURLConnection.getURL().getHost())};
} catch (Throwable th) {
ft.a().c(th);
}
sSLContext.init(null, trustManagerArr, new SecureRandom());
httpsURLConnection.setSSLSocketFactory(sSLContext.getSocketFactory());
httpsURLConnection.setHostnameVerifier(x509HostnameVerifier);
}
int i10 = aVar == null ? f8838a : aVar.f8848b;
if (i10 > 0) {
httpURLConnection.setConnectTimeout(i10);
}
int i11 = aVar == null ? f8839b : aVar.f8847a;
if (i11 > 0) {
httpURLConnection.setReadTimeout(i11);
}
return httpURLConnection;
}
@Deprecated
private void a(String str, ArrayList<gq<String>> arrayList, ArrayList<gq<String>> arrayList2, a aVar, gp gpVar) throws Throwable {
HashMap<String, Object> hashMap = new HashMap<>();
Iterator<gq<String>> it = arrayList.iterator();
while (it.hasNext()) {
gq<String> next = it.next();
hashMap.put(next.f8824a, next.f8825b);
}
a(str, hashMap, arrayList2, aVar, gpVar);
}
private void a(URLConnection uRLConnection, HashMap<String, String> hashMap) {
if (hashMap == null || hashMap.isEmpty()) {
return;
}
for (Map.Entry<String, String> entry : hashMap.entrySet()) {
uRLConnection.setRequestProperty(entry.getKey(), entry.getValue());
}
}
private static boolean a(HttpURLConnection httpURLConnection) {
try {
if (httpURLConnection.getResponseCode() == 301 || httpURLConnection.getResponseCode() == 302 || httpURLConnection.getResponseCode() == 304 || httpURLConnection.getResponseCode() == 307) {
return true;
}
return httpURLConnection.getResponseCode() == 308;
} catch (Throwable th) {
ft.a().a(th);
return false;
}
}
@Deprecated
public String a(String str, ArrayList<gq<String>> arrayList, ArrayList<gq<String>> arrayList2, a aVar) throws Throwable {
final HashMap hashMap = new HashMap();
a(str, arrayList, arrayList2, aVar, new gp() {
@Override
public void a(gn gnVar) throws Throwable {
InputStreamReader inputStreamReader;
InputStreamReader inputStreamReader2;
int a10 = gnVar.a();
BufferedReader bufferedReader = null;
if (a10 == 200 || a10 == 201) {
StringBuilder sb2 = new StringBuilder();
try {
inputStreamReader = new InputStreamReader(gnVar.b(), Charset.forName("utf-8"));
try {
BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader);
while (true) {
try {
String readLine = bufferedReader2.readLine();
if (readLine == null) {
fm.a(bufferedReader2, inputStreamReader);
hashMap.put(co.a("003DflJhDhj"), sb2.toString());
return;
} else {
if (sb2.length() > 0) {
sb2.append('\n');
}
sb2.append(readLine);
}
} catch (Throwable th) {
th = th;
bufferedReader = bufferedReader2;
fm.a(bufferedReader, inputStreamReader);
throw th;
}
}
} catch (Throwable th2) {
th = th2;
}
} catch (Throwable th3) {
th = th3;
inputStreamReader = null;
}
} else {
StringBuilder sb3 = new StringBuilder();
try {
inputStreamReader2 = new InputStreamReader(gnVar.c(), Charset.forName("utf-8"));
try {
BufferedReader bufferedReader3 = new BufferedReader(inputStreamReader2);
while (true) {
try {
String readLine2 = bufferedReader3.readLine();
if (readLine2 == null) {
fm.a(bufferedReader3, inputStreamReader2);
HashMap hashMap2 = new HashMap();
hashMap2.put(co.a("005hJflflgffl"), sb3.toString());
hashMap2.put(co.a("006=hjIkfkPfihj"), Integer.valueOf(a10));
new hc();
throw new Throwable(hc.a(hashMap2));
}
if (sb3.length() > 0) {
sb3.append('\n');
}
sb3.append(readLine2);
} catch (Throwable th4) {
th = th4;
bufferedReader = bufferedReader3;
fm.a(bufferedReader, inputStreamReader2);
throw th;
}
}
} catch (Throwable th5) {
th = th5;
}
} catch (Throwable th6) {
th = th6;
inputStreamReader2 = null;
}
}
}
});
if (hashMap.containsKey(co.a("003GflEhChj"))) {
return (String) hashMap.get(co.a("003CflYh2hj"));
}
return null;
}
public String a(String str, HashMap<String, Object> hashMap, HashMap<String, String> hashMap2) throws Throwable {
a aVar = new a();
aVar.f8847a = 30000;
aVar.f8848b = LocationClientOption.MIN_AUTO_NOTIFY_INTERVAL;
return a(str, hashMap, hashMap2, aVar);
}
public String a(String str, HashMap<String, Object> hashMap, HashMap<String, String> hashMap2, a aVar) throws Throwable {
InputStreamReader inputStreamReader;
InputStreamReader inputStreamReader2;
ft.a().a(String.format("hgt: %s", str) + "\n" + String.format("hd: %s", hashMap2), new Object[0]);
long currentTimeMillis = System.currentTimeMillis();
if (hashMap != null) {
String a10 = a(hashMap);
if (a10.length() > 0) {
str = str + "?" + a10;
}
}
HttpURLConnection a11 = a(str, aVar);
a(a11, hashMap2);
a11.setInstanceFollowRedirects(this.f8841c);
a11.connect();
int responseCode = a11.getResponseCode();
BufferedReader bufferedReader = null;
if (responseCode == 200) {
StringBuilder sb2 = new StringBuilder();
try {
inputStreamReader2 = new InputStreamReader(a11.getInputStream(), Charset.forName("utf-8"));
try {
BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader2);
while (true) {
try {
String readLine = bufferedReader2.readLine();
if (readLine == null) {
fm.a(bufferedReader2, inputStreamReader2);
a11.disconnect();
String sb3 = sb2.toString();
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
return sb3;
}
if (sb2.length() > 0) {
sb2.append('\n');
}
sb2.append(readLine);
} catch (Throwable th) {
th = th;
bufferedReader = bufferedReader2;
fm.a(bufferedReader, inputStreamReader2);
throw th;
}
}
} catch (Throwable th2) {
th = th2;
}
} catch (Throwable th3) {
th = th3;
inputStreamReader2 = null;
}
} else {
StringBuilder sb4 = new StringBuilder();
try {
inputStreamReader = new InputStreamReader(a11.getErrorStream(), Charset.forName("utf-8"));
try {
BufferedReader bufferedReader3 = new BufferedReader(inputStreamReader);
while (true) {
try {
String readLine2 = bufferedReader3.readLine();
if (readLine2 == null) {
fm.a(bufferedReader3, inputStreamReader);
a11.disconnect();
HashMap hashMap3 = new HashMap();
hashMap3.put(co.a("005h<flflgffl"), sb4.toString());
hashMap3.put(co.a("006;hj_kfk<fihj"), Integer.valueOf(responseCode));
throw new Throwable(hc.a(hashMap3));
}
if (sb4.length() > 0) {
sb4.append('\n');
}
sb4.append(readLine2);
} catch (Throwable th4) {
th = th4;
bufferedReader = bufferedReader3;
fm.a(bufferedReader, inputStreamReader);
throw th;
}
}
} catch (Throwable th5) {
th = th5;
}
} catch (Throwable th6) {
th = th6;
inputStreamReader = null;
}
}
}
public void a(String str, gu guVar, a aVar) throws Throwable {
a(str, new HashMap<>(), guVar, aVar);
}
public void a(String str, final OutputStream outputStream, a aVar) throws Throwable {
final byte[] bArr = new byte[1024];
a(str, new gu() {
@Override
public void a(InputStream inputStream) throws Throwable {
int read = inputStream.read(bArr);
while (read != -1) {
outputStream.write(bArr, 0, read);
read = inputStream.read(bArr);
}
}
}, aVar);
outputStream.flush();
}
public void a(String str, HashMap<String, String> hashMap, gm gmVar, int i10, gp gpVar, a aVar) throws Throwable {
OutputStream outputStream;
long currentTimeMillis = System.currentTimeMillis();
ft.a().a("hptr: " + str, new Object[0]);
HttpURLConnection a10 = a(str, aVar);
a10.setDoOutput(true);
if (i10 >= 0) {
a10.setChunkedStreamingMode(0);
}
a(a10, hashMap);
a10.setInstanceFollowRedirects(this.f8841c);
a10.connect();
InputStream inputStream = null;
try {
outputStream = a10.getOutputStream();
} catch (Throwable th) {
th = th;
outputStream = null;
}
try {
inputStream = gmVar.c();
byte[] bArr = new byte[65536];
while (true) {
int read = inputStream.read(bArr);
if (read <= 0) {
break;
} else {
outputStream.write(bArr, 0, read);
}
}
outputStream.flush();
fm.a(inputStream, outputStream);
if (gpVar != null) {
try {
gpVar.a(new go(a10));
} finally {
}
}
a10.disconnect();
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
} catch (Throwable th2) {
th = th2;
fm.a(inputStream, outputStream);
throw th;
}
}
public void a(String str, HashMap<String, String> hashMap, gu guVar, a aVar) throws Throwable {
InputStreamReader inputStreamReader;
long currentTimeMillis = System.currentTimeMillis();
ft.a().a("rawGet: " + str, new Object[0]);
HttpURLConnection a10 = a(str, aVar);
a(a10, hashMap);
a10.setInstanceFollowRedirects(this.f8841c);
a10.connect();
int responseCode = a10.getResponseCode();
if (responseCode == 200) {
if (guVar != null) {
InputStream inputStream = a10.getInputStream();
try {
guVar.a(inputStream);
fm.a(inputStream);
} finally {
}
}
a10.disconnect();
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
return;
}
if (a(a10)) {
a(a10.getHeaderField(co.a("008AhegfXefk1fkgf)g")), new HashMap<>(), guVar, aVar);
return;
}
StringBuilder sb2 = new StringBuilder();
BufferedReader bufferedReader = null;
try {
inputStreamReader = new InputStreamReader(a10.getErrorStream(), Charset.forName("utf-8"));
try {
BufferedReader bufferedReader2 = new BufferedReader(inputStreamReader);
while (true) {
try {
String readLine = bufferedReader2.readLine();
if (readLine == null) {
fm.a(bufferedReader2, inputStreamReader);
a10.disconnect();
HashMap hashMap2 = new HashMap();
hashMap2.put(co.a("005hHflflgffl"), sb2.toString());
hashMap2.put(co.a("006>hjQkfk4fihj"), Integer.valueOf(responseCode));
throw new Throwable(hc.a(hashMap2));
}
if (sb2.length() > 0) {
sb2.append('\n');
}
sb2.append(readLine);
} catch (Throwable th) {
th = th;
bufferedReader = bufferedReader2;
fm.a(bufferedReader, inputStreamReader);
throw th;
}
}
} catch (Throwable th2) {
th = th2;
}
} catch (Throwable th3) {
th = th3;
inputStreamReader = null;
}
}
@Deprecated
public void a(String str, HashMap<String, Object> hashMap, ArrayList<gq<String>> arrayList, a aVar, gp gpVar) throws Throwable {
OutputStream outputStream;
long currentTimeMillis = System.currentTimeMillis();
ft.a().c("jsonPost: " + str);
HttpURLConnection a10 = a(str, aVar);
a10.setDoOutput(true);
a10.setChunkedStreamingMode(0);
a10.setRequestProperty("content-type", "application/json");
if (arrayList != null) {
Iterator<gq<String>> it = arrayList.iterator();
while (it.hasNext()) {
gq<String> next = it.next();
a10.setRequestProperty(next.f8824a, next.f8825b);
}
}
gv gvVar = new gv();
if (hashMap != null) {
new hc();
gvVar.a(hc.a((HashMap) hashMap));
}
a10.setInstanceFollowRedirects(this.f8841c);
a10.connect();
InputStream inputStream = null;
try {
outputStream = a10.getOutputStream();
try {
inputStream = gvVar.c();
byte[] bArr = new byte[65536];
while (true) {
int read = inputStream.read(bArr);
if (read <= 0) {
break;
} else {
outputStream.write(bArr, 0, read);
}
}
outputStream.flush();
fm.a(inputStream, outputStream);
if (gpVar != null) {
try {
gpVar.a(new go(a10));
} finally {
}
}
a10.disconnect();
ft.a().c("use time: " + (System.currentTimeMillis() - currentTimeMillis));
} catch (Throwable th) {
th = th;
fm.a(inputStream, outputStream);
throw th;
}
} catch (Throwable th2) {
th = th2;
outputStream = null;
}
}
public void a(String str, byte[] bArr, HashMap<String, String> hashMap, int i10, gp gpVar, a aVar) throws Throwable {
char c10;
OutputStream outputStream;
ByteArrayOutputStream byteArrayOutputStream;
?? r15;
long currentTimeMillis = System.currentTimeMillis();
ft.a().a("hpt: " + str, new Object[0]);
HttpURLConnection a10 = a(str, aVar);
a10.setDoOutput(true);
if (i10 >= 0) {
a10.setChunkedStreamingMode(0);
}
a(a10, hashMap);
a10.setRequestProperty(co.a("010(imgf.gghekRfkgfNg"), "Keep-Alive");
a10.setRequestProperty("Content-Type", "application/octet-stream");
a10.setInstanceFollowRedirects(this.f8841c);
a10.connect();
ByteArrayInputStream byteArrayInputStream = null;
try {
outputStream = a10.getOutputStream();
try {
String a11 = fl.a();
if (a11 == null) {
a11 = BuildConfig.FLAVOR;
}
byte[] bytes = a11.getBytes("utf-8");
byteArrayOutputStream = new ByteArrayOutputStream();
try {
r15 = new DataOutputStream(byteArrayOutputStream);
c10 = 3;
try {
r15.writeInt(bytes.length);
r15.write(bytes);
r15.write(bArr);
r15.flush();
ByteArrayInputStream byteArrayInputStream2 = new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
try {
byte[] bArr2 = new byte[65536];
while (true) {
int read = byteArrayInputStream2.read(bArr2);
if (read <= 0) {
break;
} else {
outputStream.write(bArr2, 0, read);
}
}
outputStream.flush();
if (gpVar != null) {
try {
gpVar.a(new go(a10));
} finally {
}
}
a10.disconnect();
fm.a((Closeable[]) new Closeable[]{byteArrayInputStream2, outputStream, r15, byteArrayOutputStream});
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
} catch (Throwable th) {
th = th;
byteArrayInputStream = byteArrayInputStream2;
a10.disconnect();
?? r22 = new Closeable[4];
r22[0] = byteArrayInputStream;
r22[1] = outputStream;
r22[2] = r15;
r22[c10] = byteArrayOutputStream;
fm.a((Closeable[]) r22);
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
throw th;
}
} catch (Throwable th2) {
th = th2;
}
} catch (Throwable th3) {
th = th3;
c10 = 3;
r15 = 0;
}
} catch (Throwable th4) {
th = th4;
c10 = 3;
byteArrayOutputStream = null;
r15 = byteArrayOutputStream;
a10.disconnect();
?? r222 = new Closeable[4];
r222[0] = byteArrayInputStream;
r222[1] = outputStream;
r222[2] = r15;
r222[c10] = byteArrayOutputStream;
fm.a((Closeable[]) r222);
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
throw th;
}
} catch (Throwable th5) {
th = th5;
c10 = 3;
outputStream = null;
byteArrayOutputStream = null;
}
}
public String b(String str, HashMap<String, Object> hashMap, HashMap<String, String> hashMap2, a aVar) throws Throwable {
InputStream inputStream;
OutputStream outputStream;
BufferedReader bufferedReader;
InputStreamReader inputStreamReader;
BufferedReader bufferedReader2;
InputStreamReader inputStreamReader2;
long currentTimeMillis = System.currentTimeMillis();
ft.a().a("hpt: " + str + "\nhd: " + hashMap2, new Object[0]);
HttpURLConnection a10 = a(str, aVar);
a10.setDoOutput(true);
a(a10, hashMap2);
a10.setRequestProperty(co.a("0101imgf2gghek.fkgf7g"), "Keep-Alive");
a10.setRequestProperty("Content-Type", co.a("033flliCfkRefkYfkgf]gnMgejmhhhhhhjmghgfflfhjmfifl%ihgeGgffeGhXfe"));
gv gvVar = new gv();
if (hashMap != null) {
gvVar.a(a(hashMap));
}
a10.setFixedLengthStreamingMode((int) gvVar.b());
a10.setInstanceFollowRedirects(this.f8841c);
a10.connect();
try {
outputStream = a10.getOutputStream();
try {
InputStream c10 = gvVar.c();
try {
byte[] bArr = new byte[65536];
while (true) {
int read = c10.read(bArr);
if (read <= 0) {
break;
}
outputStream.write(bArr, 0, read);
}
outputStream.flush();
int responseCode = a10.getResponseCode();
if (responseCode == 200 || responseCode < 300) {
StringBuilder sb2 = new StringBuilder();
try {
InputStreamReader inputStreamReader3 = new InputStreamReader(a10.getInputStream(), Charset.forName("utf-8"));
try {
BufferedReader bufferedReader3 = new BufferedReader(inputStreamReader3);
while (true) {
try {
String readLine = bufferedReader3.readLine();
if (readLine == null) {
fm.a(bufferedReader3, inputStreamReader3);
String sb3 = sb2.toString();
a10.disconnect();
fm.a(c10, outputStream);
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
return sb3;
}
if (sb2.length() > 0) {
sb2.append('\n');
}
sb2.append(readLine);
} catch (Throwable th) {
th = th;
inputStreamReader = inputStreamReader3;
bufferedReader = bufferedReader3;
fm.a(bufferedReader, inputStreamReader);
throw th;
}
}
} catch (Throwable th2) {
th = th2;
inputStreamReader = inputStreamReader3;
bufferedReader = null;
}
} catch (Throwable th3) {
th = th3;
bufferedReader = null;
inputStreamReader = null;
}
} else {
StringBuilder sb4 = new StringBuilder();
try {
inputStreamReader2 = new InputStreamReader(a10.getErrorStream(), Charset.forName("utf-8"));
try {
bufferedReader2 = new BufferedReader(inputStreamReader2);
while (true) {
try {
String readLine2 = bufferedReader2.readLine();
if (readLine2 == null) {
fm.a(bufferedReader2, inputStreamReader2);
HashMap hashMap3 = new HashMap();
hashMap3.put(co.a("005hRflflgffl"), sb4.toString());
hashMap3.put(co.a("0060hjPkfk*fihj"), Integer.valueOf(responseCode));
throw new Throwable(hc.a(hashMap3));
}
if (sb4.length() > 0) {
sb4.append('\n');
}
sb4.append(readLine2);
} catch (Throwable th4) {
th = th4;
fm.a(bufferedReader2, inputStreamReader2);
throw th;
}
}
} catch (Throwable th5) {
th = th5;
bufferedReader2 = null;
}
} catch (Throwable th6) {
th = th6;
bufferedReader2 = null;
inputStreamReader2 = null;
}
}
} catch (Throwable th7) {
th = th7;
inputStream = c10;
a10.disconnect();
fm.a(inputStream, outputStream);
ft.a().a("use time: " + (System.currentTimeMillis() - currentTimeMillis), new Object[0]);
throw th;
}
} catch (Throwable th8) {
th = th8;
inputStream = null;
}
} catch (Throwable th9) {
th = th9;
inputStream = null;
outputStream = null;
}
}
}