导航菜单

页面标题

页面副标题

Tasker v6.5.11 - i.java 源代码

正在查看: Tasker v6.5.11 应用的 i.java JAVA 源代码文件

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


package com.joaomgcd.taskerm.action.net;

import android.app.Activity;
import com.joaomgcd.taskerm.util.x2;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Set;
import kotlin.Pair;

public final class i {

    static final class a extends yj.q implements xj.a<String> {
        final Activity i;

        a(Activity activity) {
            super(0);
            this.i = activity;
        }

        public final String invoke() {
            List C0;
            Activity activity = this.i;
            Set keySet = i.h().keySet();
            yj.p.h(keySet, "<get-keys>(...)");
            String str = (String) ((we.w1) we.x.C(new we.v1(activity, 2131889652, kotlin.collections.r.N0(keySet), true, (xj.l) null, (Integer) null, (xj.l) null, (Boolean) null, (Boolean) null, (Integer) null, (Integer) null, (com.joaomgcd.taskerm.util.q) null, (com.joaomgcd.taskerm.util.q) null, (com.joaomgcd.taskerm.util.q) null, (Boolean) null, (Boolean) null, 65520, (yj.h) null)).f()).c();
            if (str == null) {
                throw new RuntimeException("No header type selected");
            }
            x[] xVarArr = (x[]) i.h().get(str);
            if (xVarArr == null || (C0 = kotlin.collections.l.C0(xVarArr)) == null) {
                throw new RuntimeException("Invalid header type " + str);
            }
            x xVar = (x) ((we.w1) we.x.C(new we.v1(this.i, str, C0, true, null, null, null, null, null, null, null, null, null, null, null, null, null, null, 262128, null)).f()).c();
            if (xVar == null) {
                throw new RuntimeException("No header value selected");
            }
            return str + ":" + xVar.a();
        }
    }

    static final class b extends yj.q implements xj.l<hk.i, Pair<? extends String, ? extends String>> {
        public static final b i = new b();

        b() {
            super(1);
        }

        public final Pair<String, String> invoke(hk.i iVar) {
            yj.p.i(iVar, "it");
            return new Pair<>(iVar.a().get(1), iVar.a().get(2));
        }
    }

    private static final HashMap<String, String> a(String str) {
        HashMap<String, String> hashMap = new HashMap<>();
        for (String str2 : hk.o.A0(str, new String[]{"\n"}, false, 0, 6, (Object) null)) {
            int a0 = hk.o.a0(str2, ":", 0, false, 6, (Object) null);
            if (a0 > 0) {
                String substring = str2.substring(0, a0);
                yj.p.h(substring, "substring(...)");
                String substring2 = str2.substring(a0 + 1);
                yj.p.h(substring2, "substring(...)");
                hashMap.put(substring, substring2);
            }
        }
        return hashMap;
    }

    public static final ji.r<String> e(Activity activity) {
        return pg.w0.K0(new a(activity));
    }

    public static final boolean f(u uVar) {
        return uVar != null && x2.e0(uVar, new Object[]{u.q, u.s, u.t, u.u, u.v});
    }

    private static final x[] g() {
        String[] strArr = {"audio/aac", "application/x-abiword", "application/octet-stream", "video/x-msvideo", "application/vnd.amazon.ebook", "application/x-bzip", "application/x-bzip2", "application/x-csh", "text/css", "text/csv", "application/msword", "application/vnd.ms-fontobject", "application/epub+zip", "image/gif", "text/html", "image/x-icon", "text/calendar", "application/java-archive", "image/jpeg", "application/javascript", "application/json", "audio/midi", "video/mpeg", "application/vnd.apple.installer+xml", "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.text", "audio/ogg", "video/ogg", "application/ogg", "font/otf", "image/png", "application/pdf", "application/vnd.ms-powerpoint", "application/x-rar-compressed", "application/rtf", "application/x-sh", "image/svg+xml", "application/x-shockwave-flash", "application/x-tar", "image/tiff", "application/typescript", "font/ttf", "application/vnd.visio", "audio/x-wav", "audio/webm", "video/webm", "image/webp", "font/woff", "font/woff2", "application/xhtml+xml", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/xml", "application/vnd.mozilla.xul+xml", "application/zip", "video/3gpp", "video/3gpp2", "application/x-7z-compressed"};
        ArrayList arrayList = new ArrayList(59);
        for (int i = 0; i < 59; i++) {
            arrayList.add(new x(strArr[i]));
        }
        return (x[]) arrayList.toArray(new x[0]);
    }

    public static final HashMap<String, x[]> h() {
        return kotlin.collections.k0.g(new Pair[]{new Pair("Accept", g()), new Pair("Content-Type", g()), new Pair("User-Agent", new x[]{new x("Google Chrome Desktop", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36"), new x("Mozilla Firefox Desktop", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0"), new x("Microsoft Edge Desktop", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393"), new x("Microsoft Internet Explorer 6 / IE 6", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"), new x("Microsoft Internet Explorer 7 / IE 7", "Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)"), new x("Microsoft Internet Explorer 8 / IE 8", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"), new x("Microsoft Internet Explorer 9 / IE 9", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0;  Trident/5.0)"), new x("Microsoft Internet Explorer 10 / IE 10", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; MDDCJS)"), new x("Microsoft Internet Explorer 11 / IE 11", "Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko"), new x("Apple iPad", "Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4"), new x("Apple iPhone", "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1"), new x("Googlebot (Google Search Engine Bot)", "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"), new x("Bing Bot (Bing Search Engine Bot)", "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"), new x("Samsung Phone", "Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-G570Y Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36"), new x("Google Phone", "Mozilla/5.0 (Linux; U; Android-4.0.3; en-us; Galaxy Nexus Build/IML74K) AppleWebKit/535.7 (KHTML, like Gecko) CrMo/16.0.912.75 Mobile Safari/535.7"), new x("HTC Phone", "Mozilla/5.0 (Linux; Android 7.0; HTC 10 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36"), new x("Curl", "curl/7.35.0"), new x("Wget", "Wget/1.15 (linux-gnu)")})});
    }

    public static final HashMap<String, String> i(String str) {
        yj.p.i(str, "<this>");
        try {
            Pair[] pairArr = (Pair[]) gk.k.y(gk.k.t(hk.k.e(new hk.k("(?ms)^([^:\\s]+):(.*?)(?=\\n[^:\\s]+:|\\Z)", kotlin.collections.r0.e(new hk.m[]{hk.m.s, hk.m.w})), str, 0, 2, (Object) null), b.i)).toArray(new Pair[0]);
            HashMap<String, String> g = kotlin.collections.k0.g((Pair[]) Arrays.copyOf(pairArr, pairArr.length));
            return g.keySet().size() != 0 ? g : a(str);
        } catch (Throwable unused) {
            return a(str);
        }
    }
}