超媒网络 v3.0.0版本的 MD5 值为:e72248abb238993f421967424d9a9515

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


package p.a.y.e.a.s.e.net;

import android.text.TextUtils;
import android.util.Log;
import com.meizu.cloud.pushsdk.networking.common.ANConstants;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSession;
import org.json.JSONException;
import org.json.JSONObject;
public class v11 extends Cdo {
    private String lite_default = "http://localhost:3000/logupload";

    public class a implements HostnameVerifier {
        public a() {
        }

        @Override
        public boolean verify(String str, SSLSession sSLSession) {
            return true;
        }
    }

    private HashMap<String, String> lite_byte() {
        return r5.n("Content-Type", wy1.lite_byte, "client", "android");
    }

    private boolean lite_case(byte[] bArr) throws JSONException {
        if (bArr != null) {
            String str = new String(bArr);
            return !TextUtils.isEmpty(str) && new JSONObject(str).optBoolean(ANConstants.SUCCESS, false);
        }
        return false;
    }

    private byte[] lite_new(String str, InputStream e, Map<String, String> map) {
        HttpURLConnection httpURLConnection;
        InputStream inputStream;
        HttpURLConnection httpURLConnection2;
        HttpURLConnection httpURLConnection3;
        HttpURLConnection httpURLConnection4;
        InputStream inputStream2;
        InputStream inputStream3;
        InputStream inputStream4;
        HttpURLConnection httpURLConnection5;
        InputStream inputStream5;
        byte[] bArr;
        OutputStream outputStream = new byte[2048];
        OutputStream outputStream2 = null;
        InputStream inputStream6 = null;
        outputStream2 = null;
        try {
            try {
                httpURLConnection5 = (HttpURLConnection) new URL(str).openConnection();
            } catch (Throwable th) {
                th = th;
                outputStream2 = outputStream;
                inputStream = inputStream3;
                httpURLConnection = str;
                inputStream4 = e;
            }
        } catch (MalformedURLException e2) {
            e = e2;
            httpURLConnection4 = null;
            inputStream2 = null;
        } catch (ProtocolException e3) {
            e = e3;
            httpURLConnection3 = null;
            outputStream = null;
        } catch (IOException e4) {
            e = e4;
            httpURLConnection2 = null;
            outputStream = null;
        } catch (Throwable th2) {
            th = th2;
            httpURLConnection = null;
            inputStream = null;
            inputStream4 = e;
        }
        try {
            if (httpURLConnection5 instanceof HttpsURLConnection) {
                ((HttpsURLConnection) httpURLConnection5).setHostnameVerifier(new a());
            }
            for (Map.Entry<String, String> entry : map.entrySet()) {
                httpURLConnection5.addRequestProperty(entry.getKey(), entry.getValue());
            }
            httpURLConnection5.setReadTimeout(15000);
            httpURLConnection5.setConnectTimeout(15000);
            httpURLConnection5.setDoInput(true);
            httpURLConnection5.setDoOutput(true);
            httpURLConnection5.setRequestMethod(gb2.H);
            OutputStream outputStream3 = httpURLConnection5.getOutputStream();
            while (true) {
                try {
                    int read = e.read(outputStream);
                    if (read == -1) {
                        break;
                    }
                    outputStream3.write(outputStream, 0, read);
                } catch (MalformedURLException e5) {
                    e = e5;
                    inputStream5 = null;
                } catch (ProtocolException e6) {
                    e = e6;
                    inputStream5 = null;
                } catch (IOException e7) {
                    e = e7;
                    inputStream5 = null;
                } catch (Throwable th3) {
                    th = th3;
                    inputStream5 = null;
                }
            }
            outputStream3.flush();
            if (httpURLConnection5.getResponseCode() == 200) {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                inputStream5 = httpURLConnection5.getInputStream();
                while (true) {
                    try {
                        int read2 = inputStream5.read(outputStream);
                        if (read2 == -1) {
                            break;
                        }
                        byteArrayOutputStream.write(outputStream, 0, read2);
                    } catch (MalformedURLException e8) {
                        e = e8;
                        MalformedURLException malformedURLException = e;
                        outputStream = outputStream3;
                        e = malformedURLException;
                        inputStream3 = inputStream5;
                        str = httpURLConnection5;
                        e.printStackTrace();
                        if (outputStream != 0) {
                            try {
                                outputStream.close();
                            } catch (IOException e9) {
                                e9.printStackTrace();
                            }
                        }
                        if (inputStream3 != null) {
                            try {
                                inputStream3.close();
                            } catch (IOException e10) {
                                e10.printStackTrace();
                            }
                        }
                        if (e != 0) {
                            try {
                                e.close();
                            } catch (IOException e11) {
                                e = e11;
                                e.printStackTrace();
                            }
                        }
                    } catch (ProtocolException e12) {
                        e = e12;
                        ProtocolException protocolException = e;
                        outputStream = outputStream3;
                        e = protocolException;
                        inputStream3 = inputStream5;
                        str = httpURLConnection5;
                        e.printStackTrace();
                        if (outputStream != null) {
                            try {
                                outputStream.close();
                            } catch (IOException e13) {
                                e13.printStackTrace();
                            }
                        }
                        if (inputStream3 != 0) {
                            try {
                                inputStream3.close();
                            } catch (IOException e14) {
                                e14.printStackTrace();
                            }
                        }
                        if (e != 0) {
                            try {
                                e.close();
                            } catch (IOException e15) {
                                e = e15;
                                e.printStackTrace();
                            }
                        }
                    } catch (IOException e16) {
                        e = e16;
                        IOException iOException = e;
                        outputStream = outputStream3;
                        e = iOException;
                        inputStream3 = inputStream5;
                        str = httpURLConnection5;
                        e.printStackTrace();
                        if (outputStream != null) {
                            try {
                                outputStream.close();
                            } catch (IOException e17) {
                                e17.printStackTrace();
                            }
                        }
                        if (inputStream3 != 0) {
                            try {
                                inputStream3.close();
                            } catch (IOException e18) {
                                e18.printStackTrace();
                            }
                        }
                        if (e != 0) {
                            try {
                                e.close();
                            } catch (IOException e19) {
                                e = e19;
                                e.printStackTrace();
                            }
                        }
                    } catch (Throwable th4) {
                        th = th4;
                        outputStream2 = outputStream3;
                        th = th;
                        inputStream = inputStream5;
                        httpURLConnection = httpURLConnection5;
                        inputStream4 = e;
                        if (outputStream2 != null) {
                            try {
                                outputStream2.close();
                            } catch (IOException e20) {
                                e20.printStackTrace();
                            }
                        }
                        if (inputStream != null) {
                            try {
                                inputStream.close();
                            } catch (IOException e21) {
                                e21.printStackTrace();
                            }
                        }
                        if (inputStream4 != null) {
                            try {
                                inputStream4.close();
                            } catch (IOException e22) {
                                e22.printStackTrace();
                            }
                        }
                        if (httpURLConnection != null) {
                            httpURLConnection.disconnect();
                        }
                        throw th;
                    }
                }
                bArr = byteArrayOutputStream.toByteArray();
                inputStream6 = inputStream5;
            } else {
                bArr = null;
            }
            try {
                outputStream3.close();
            } catch (IOException e23) {
                e23.printStackTrace();
            }
            if (inputStream6 != null) {
                try {
                    inputStream6.close();
                } catch (IOException e24) {
                    e24.printStackTrace();
                }
            }
            try {
                e.close();
            } catch (IOException e25) {
                e25.printStackTrace();
            }
            httpURLConnection5.disconnect();
            return bArr;
        } catch (MalformedURLException e26) {
            e = e26;
            inputStream2 = null;
            httpURLConnection4 = httpURLConnection5;
            inputStream3 = inputStream2;
            outputStream = inputStream2;
            str = httpURLConnection4;
            e.printStackTrace();
            if (outputStream != 0) {
            }
            if (inputStream3 != null) {
            }
            if (e != 0) {
            }
        } catch (ProtocolException e27) {
            e = e27;
            outputStream = null;
            httpURLConnection3 = httpURLConnection5;
            inputStream3 = outputStream;
            str = httpURLConnection3;
            e.printStackTrace();
            if (outputStream != null) {
            }
            if (inputStream3 != 0) {
            }
            if (e != 0) {
            }
        } catch (IOException e28) {
            e = e28;
            outputStream = null;
            httpURLConnection2 = httpURLConnection5;
            inputStream3 = outputStream;
            str = httpURLConnection2;
            e.printStackTrace();
            if (outputStream != null) {
            }
            if (inputStream3 != 0) {
            }
            if (e != 0) {
            }
        } catch (Throwable th5) {
            th = th5;
            inputStream = null;
            httpURLConnection = httpURLConnection5;
            inputStream4 = e;
        }
    }

    private boolean lite_try(File file) {
        try {
            return lite_case(lite_new(this.lite_default, new FileInputStream(file), lite_byte()));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            return false;
        } catch (JSONException e2) {
            e2.printStackTrace();
            return false;
        }
    }

    public void lite_char(String str) {
        this.lite_default = str;
    }

    @Override
    public void lite_if(File file) {
        boolean lite_try = lite_try(file);
        Log.d("上传日志测试", "日志上传测试结果:" + lite_try);
        lite_do();
        if (file.getName().contains(".copy")) {
            file.delete();
        }
    }
}