Вверх ↑
Ответов: 278
Рейтинг: 5
#1: 2022-05-29 15:37:22 ЛС | профиль | цитата
Решил по пробовать сделать на регулярных выражениях.Вроде бы все хорошо--но как всегда проблема.После замены обрезает файл.

Add(MainForm,2953706,21,105)
{
Width=566
Height=639
}
Add(Button,612857,588,301)
{
Left=35
Top=45
link(onClick,10891095:doEvent1,[])
}
Add(Memo,4901527,714,315)
{
Left=40
Top=110
Width=470
Height=455
ScrollBars=3
Point(doLoad)
link(Str,5839119:Result,[])
}
Add(RE_Replace,5839119,714,266)
{
Expression=""http.*://.*(61.145.124.238|ad.api.kaffnet|ad.mail.ru|ad.myinstashot.com|adc3-launch|adbuddiz|adcolony|addapptr|adincube|adjust|adkmob|adknowledge|admarvel|admob|Admob|admost|adnw_logging|adsafeprotected|adsdk|adsert|adserver|adservice|advertising|adview|adz.wattpad|aerserv|airpush|altamob|alta.eqmob|amazon-adsystem|amazonaws|analytics|appAdForce|appboy|appbrain|appenda|appia|applifier.com|applovin|applvn|appnext|appnexus|appodeal|apprupt|apsalar|appsdt|appsflyer|audience_network|avocarrot|azure|boxdigital/sdk/ad|branch|ca-app-pub|certificate.mobile.yandex.net|chartboost|cloudfront|code.google.com/p/android/issues/detail|crashlytics|csi.gstatic.com|doubleclick.net|dsp.batmobil|duapps|firebaseapp|flurry|fyber|g.doubleclick|google/android/gms/internal|google.com/safebrowsing/clientreport|googleapis.com/auth/games|googleads|googlesyndication|graph.facebook|greystripe|heyzap|hockeyapp|hyprmx|InlineAd|inmobi|inneractive|instreamatic|integralads|ironsource|jirbo|jumptap|kochava|Leadbolt|localytics|loopme|madnet.ru|mdotm|measurement|mediabrix|metrica|millennialmedia|mngads|moat|mobclix|mobfox|mobvista|montexi|moolah|mopub|mp.mydas.mobi|my/target|NativeInterstitial|net.rayjump|network_ads_common|nexage|onelouder/adlib|openx|pagead/ads|plus1.wapstart.ru|pubmatic|pubnative|r.my.com/mobile|revmob|sb.scorecardresearch|smaato/SOMA|startapp|startup.mobile.yandex.net|supersonicads|tagmanager|tapas|tapjoy|udm.scorecardresearch|unity3d/ads|unityads|vdopia|vungle|www.dummy|wzrkt|xtify|yandexadexchange|zestadz).*""
ReplaceStr=""http""
link(onReplace,4901527:doText,[(758,272)(758,307)(702,307)(702,342)])
link(SourceStr,12827230:Text,[])
}
Add(StrList,12827230,714,217)
{
Strings=#35:.class public final Lc/d/b/a/a/t/b;|25:.super Ljava/lang/Thread;|10:.source ""|0:|0:|17:# instance fields|47:.field public final synthetic c:Ljava/util/Map;|0:|0:|16:# direct methods|51:.method public constructor <init>(Ljava/util/Map;)V|13: .locals 0|0:|58: iput-object p1, p0, Lc/d/b/a/a/t/b;->c:Ljava/util/Map;|0:|53: invoke-direct {p0}, Ljava/lang/Thread;-><init>()V|0:|15: return-void|11:.end method|0:|0:|17:# virtual methods|27:.method public final run()V|13: .locals 7|0:|25: const-string v0, ". "|0:|36: const-string v1, "HttpUrlPinger"|0:|58: iget-object v2, p0, Lc/d/b/a/a/t/b;->c:Ljava/util/Map;|0:|88: const-string v3, "https://pagead2.googlesyndication.com/pagead/gen_204?id=gmob-apps"|0:|85: invoke-static {v3}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;|0:|25: move-result-object v3|0:|80: invoke-virtual {v3}, Landroid/net/Uri;->buildUpon()Landroid/net/Uri$Builder;|0:|25: move-result-object v3|0:|67: invoke-interface {v2}, Ljava/util/Map;->keySet()Ljava/util/Set;|0:|25: move-result-object v4|0:|74: invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;|0:|25: move-result-object v4|0:|11: :goto_0|59: invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z|0:|18: move-result v5|0:|22: if-eqz v5, :cond_0|0:|73: invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;|0:|25: move-result-object v5|0:|37: check-cast v5, Ljava/lang/String;|0:|89: invoke-interface {v2, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;|0:|25: move-result-object v6|0:|37: check-cast v6, Ljava/lang/String;|0:|143: invoke-virtual {v3, v5, v6}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder;|0:|16: goto :goto_0|0:|11: :cond_0|76: invoke-virtual {v3}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri;|0:|25: move-result-object v2|0:|72: invoke-virtual {v2}, Landroid/net/Uri;->toString()Ljava/lang/String;|0:|25: move-result-object v2|0:|16: :try_start_0|35: new-instance v3, Ljava/net/URL;|0:|71: invoke-direct {v3, v2}, Ljava/net/URL;-><init>(Ljava/lang/String;)V|0:|81: invoke-virtual {v3}, Ljava/net/URL;->openConnection()Ljava/net/URLConnection;|0:|25: move-result-object v3|0:|47: check-cast v3, Ljava/net/HttpURLConnection;|14: :try_end_0|86: .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_0 .. :try_end_0} :catch_2|70: .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1|77: .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0|0:|16: :try_start_1|73: invoke-virtual {v3}, Ljava/net/HttpURLConnection;->getResponseCode()I|0:|18: move-result v4|0:|21: const/16 v5, 0xc8|0:|25: if-lt v4, v5, :cond_1|0:|22: const/16 v5, 0x12c|0:|25: if-lt v4, v5, :cond_2|0:|11: :cond_1|89: invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;|0:|25: move-result-object v5|0:|54: invoke-virtual {v5}, Ljava/lang/String;->length()I|0:|18: move-result v5|0:|29: add-int/lit8 v5, v5, 0x41|0:|46: new-instance v6, Ljava/lang/StringBuilder;|0:|65: invoke-direct {v6, v5}, Ljava/lang/StringBuilder;-><init>(I)V|0:|58: const-string v5, "Received non-success response code "|0:|107: invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;|0:|90: invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;|0:|42: const-string v4, " from pinging URL: "|0:|107: invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;|0:|107: invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;|0:|80: invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;|0:|25: move-result-object v4|0:|88: invoke-static {v1, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I|14: :try_end_1|54: .catchall {:try_start_1 .. :try_end_1} :catchall_0|0:|11: :cond_2|16: :try_start_2|68: invoke-virtual {v3}, Ljava/net/HttpURLConnection;->disconnect()V|0:|15: return-void|0:|15: :catchall_0|21: move-exception v4|0:|68: invoke-virtual {v3}, Ljava/net/HttpURLConnection;->disconnect()V|0:|12: throw v4|14: :try_end_2|86: .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_2 .. :try_end_2} :catch_2|70: .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1|77: .catch Ljava/lang/RuntimeException; {:try_start_2 .. :try_end_2} :catch_0|0:|12: :catch_0|21: move-exception v3|0:|16: goto :goto_1|0:|12: :catch_1|21: move-exception v3|0:|11: :goto_1|78: invoke-virtual {v3}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;|0:|25: move-result-object v4|0:|89: invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;|0:|25: move-result-object v5|0:|54: invoke-virtual {v5}, Ljava/lang/String;->length()I|0:|18: move-result v5|0:|29: add-int/lit8 v5, v5, 0x1b|0:|89: invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;|0:|25: move-result-object v6|0:|54: invoke-virtual {v6}, Ljava/lang/String;->length()I|0:|18: move-result v6|0:|24: add-int/2addr v6, v5|0:|46: new-instance v5, Ljava/lang/StringBuilder;|0:|65: invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(I)V|0:|48: const-string v6, "Error while pinging URL: "|0:|11: :goto_2|107: invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;|0:|107: invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;|0:|107: invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;|0:|107: invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;|0:|80: invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;|0:|25: move-result-object v0|0:|113: invoke-static {v1, v0, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I|0:|15: return-void|0:|12: :catch_2|21: move-exception v3|0:|94: invoke-virtual {v3}, Ljava/lang/IndexOutOfBoundsException;->getMessage()Ljava/lang/String;|0:|25: move-result-object v4|0:|89: invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;|0:|25: move-result-object v5|0:|54: invoke-virtual {v5}, Ljava/lang/String;->length()I|0:|18: move-result v5|0:|29: add-int/lit8 v5, v5, 0x20|0:|89: invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;|0:|25: move-result-object v6|0:|54: invoke-virtual {v6}, Ljava/lang/String;->length()I|0:|18: move-result v6|0:|24: add-int/2addr v6, v5|0:|46: new-instance v5, Ljava/lang/StringBuilder;|0:|65: invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(I)V|0:|53: const-string v6, "Error while parsing ping URL: "|0:|16: goto :goto_2|11:.end method|
}
Add(Hub,10891095,637,301)
{
OutCount=3
link(onEvent1,4901527:doLoad,[(690,307)(690,349)])
link(onEvent2,5839119:doReplace,[(683,314)(683,272)])
}

карма: 0

0