导航菜单

页面标题

页面副标题

CityMall v1.42.1 - e.java 源代码

正在查看: CityMall v1.42.1 应用的 e.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.simpl.android.fingerprint.a;

import com.simpl.android.fingerprint.commons.utils.VersionUtil;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.SocketTimeoutException;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
import org.json.JSONObject;

abstract class e {
    static String a(String str, String str2, String str3, String str4) {
        HttpsURLConnection httpsURLConnection;
        HttpsURLConnection httpsURLConnection2 = null;
        try {
            try {
                httpsURLConnection = (HttpsURLConnection) new URL("https://my-ip.getsimpl.com/my-ip?source=" + VersionUtil.getSdkName(str4) + "&platform=android&parent_app_version=" + str + "&parent_app_name=" + str2 + "&sdk_version=" + str3).openConnection();
            } catch (Throwable th) {
                th = th;
            }
        } catch (SocketTimeoutException unused) {
        } catch (Exception e) {
            e = e;
        }
        try {
            httpsURLConnection.setRequestMethod("GET");
            httpsURLConnection.setReadTimeout(1500);
            httpsURLConnection.setConnectTimeout(500);
            if (httpsURLConnection.getResponseCode() != 200) {
                httpsURLConnection.disconnect();
                return "error";
            }
            String string = b(httpsURLConnection).getString("ip");
            httpsURLConnection.disconnect();
            return string;
        } catch (SocketTimeoutException unused2) {
            httpsURLConnection2 = httpsURLConnection;
            if (httpsURLConnection2 == null) {
                return "timeout";
            }
            httpsURLConnection2.disconnect();
            return "timeout";
        } catch (Exception e2) {
            e = e2;
            httpsURLConnection2 = httpsURLConnection;
            String message = e.getMessage();
            if (httpsURLConnection2 != null) {
                httpsURLConnection2.disconnect();
            }
            return message;
        } catch (Throwable th2) {
            th = th2;
            httpsURLConnection2 = httpsURLConnection;
            if (httpsURLConnection2 != null) {
                httpsURLConnection2.disconnect();
            }
            throw th;
        }
    }

    private static JSONObject b(HttpsURLConnection httpsURLConnection) {
        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpsURLConnection.getInputStream()));
        StringBuilder sb = new StringBuilder();
        while (true) {
            String readLine = bufferedReader.readLine();
            if (readLine == null) {
                bufferedReader.close();
                return new JSONObject(sb.toString());
            }
            sb.append(readLine);
        }
    }
}