Snaptube v4.40.0.4401610版本的 MD5 值为:ca2b95dcff63007195db02a6c93091b9

以下内容为反编译后的 cot.java 源代码,内容仅作参考


package o;

import android.text.TextUtils;
import com.ducaller.fsdk.callmonitor.model.CallMessage;
import com.ducaller.fsdk.callmonitor.model.PhoneNumberInfo;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.security.SecureRandom;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import org.json.JSONObject;
public final class cot {
    public static PhoneNumberInfo m21935(String str) {
        PhoneNumberInfo phoneNumberInfo;
        String m22017;
        PhoneNumberInfo phoneNumberInfo2 = null;
        String m21939 = m21939(m21936(new cox(str)));
        if (!TextUtils.isEmpty(m21939)) {
            new cpc();
            JSONObject jSONObject = new JSONObject(m21939);
            if (jSONObject.getJSONObject("status").getInt("code") == 0) {
                phoneNumberInfo = new PhoneNumberInfo();
                String optString = jSONObject.optString("data");
                String m22061 = cqk.m22061(cpu.m21987() + cpu.m21979() + cpu.m21986());
                if (!TextUtils.isEmpty(m22061) && (m22017 = cpz.m22017(m22061, optString)) != null) {
                    JSONObject jSONObject2 = new JSONObject(m22017);
                    phoneNumberInfo.f1840 = jSONObject2.optString("title");
                    phoneNumberInfo.f1838 = jSONObject2.optString("tag");
                    phoneNumberInfo.f1833 = jSONObject2.optString("loc");
                    phoneNumberInfo.f1832 = jSONObject2.optString("carrier");
                    phoneNumberInfo.f1837 = jSONObject2.optInt("type");
                    phoneNumberInfo.f1836 = jSONObject2.optString("e164");
                    new StringBuilder("formatnumber:").append(phoneNumberInfo.f1836);
                }
                if (phoneNumberInfo2 != null) {
                    int m28315 = C1486.m28315(str);
                    if (m28315 != -1) {
                        phoneNumberInfo2.f1837 = m28315;
                        if (m28315 == 0) {
                            phoneNumberInfo2.f1838 = "";
                        }
                    }
                    phoneNumberInfo2.f1835 = str;
                    cqd.m22045(phoneNumberInfo2);
                }
            } else {
                phoneNumberInfo = null;
            }
            phoneNumberInfo2 = phoneNumberInfo;
            if (phoneNumberInfo2 != null) {
            }
        }
        return phoneNumberInfo2;
    }

    public static String m21936(coy coyVar) {
        StringBuilder sb = new StringBuilder("https://whosthat.ssl2.duapps.com");
        sb.append(coyVar.mo21941());
        StringBuilder append = sb.append("?la=");
        cpu.m21982();
        append.append(cpu.m21988());
        sb.append("&").append(coyVar.mo21942());
        sb.append("&form=").append(cpu.m21987());
        sb.append("&env=").append(C1423.f27701);
        return sb.toString();
    }

    public static void m21937(CallMessage callMessage, boolean z) {
        try {
            m21939(m21936(new cow(callMessage, z)));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void m21938(String str, String str2, String str3, int i) {
        cqd.m22039(new cou(str, str2, str3, i));
    }

    public static String m21939(String str) {
        if (str == null || TextUtils.isEmpty(str)) {
            return null;
        }
        HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(str).openConnection();
        if (httpURLConnection instanceof HttpsURLConnection) {
            SSLContext sSLContext = SSLContext.getInstance("TLS");
            sSLContext.init(null, new TrustManager[]{new coz((byte) 0)}, new SecureRandom());
            HttpsURLConnection.setDefaultSSLSocketFactory(sSLContext.getSocketFactory());
            HttpsURLConnection.setDefaultHostnameVerifier(new cpa((byte) 0));
        }
        httpURLConnection.setRequestMethod("GET");
        httpURLConnection.setReadTimeout(10000);
        httpURLConnection.setConnectTimeout(10000);
        if (httpURLConnection.getResponseCode() != 200) {
            return null;
        }
        InputStream inputStream = httpURLConnection.getInputStream();
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        byte[] bArr = new byte[1024];
        while (true) {
            int read = inputStream.read(bArr);
            if (read == -1) {
                inputStream.close();
                byteArrayOutputStream.close();
                return new String(byteArrayOutputStream.toByteArray());
            }
            byteArrayOutputStream.write(bArr, 0, read);
        }
    }

    public static void m21940(String str, String str2, String str3, int i) {
        C1486.m28316(str, i);
        m21938(str, str2, str3, i);
    }
}