Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soft98.ir [Anti-Adblock] #3011

Closed
nimasaj opened this issue Jul 23, 2018 · 43 comments
Closed

soft98.ir [Anti-Adblock] #3011

nimasaj opened this issue Jul 23, 2018 · 43 comments

Comments

@nimasaj
Copy link

nimasaj commented Jul 23, 2018

URL(s) where the issue occurs

https://soft98.ir
https://soft98.ir/software/office/365-notepad.html

Describe the issue

Anti adblock popup
Also, it disables the links

Screenshot(s)

1. https://gcdn.pbrd.co/images/HvR7w52.png 
Popup showing you have adblock turned on and asks you to disable it.


2. https://gcdn.pbrd.co/images/HvRvgUd.png
A picture of download section of second URL (links inside the page are not working as long as it detects adblock)


3. https://gcdn.pbrd.co/images/HvRvlOG.png
A picture of download section of 2nd URL in case it detect javascript is blocked. (all links are gone and it asks you to turn on javascript)

Versions

  • Browser/version: Chrome 67.0.3396.99
  • uBlock Origin version: 1.16.14

Settings

using following filter list which blocks ##*[id^="adx"], ##*[class^="adx"], ##a[href*="&utm_medium=banner&utm_campaign="]>img and ##*[href*="account.zula.ir/pages/new-iran?utm_source"]>img

Filter list: http://mynext.pro/BLF.txt

Notes

Issue is loaded from soft98.ir/templates/soft98_default/js/jquery.min.js and mainly following part:

    function(e) {
        ! function(t) {
            var n = $(".adx");
            n.on("contextmenu mousedown", function(e) {
                e.preventDefault()
            });
            var i = 'جهت مشاهده لینک، افزونه حذف تبلیغات را غیرفعال و بعد <a class="tooltip-link" href="#" onclick="location.reload();return false;">بارگذاری مجدد</a> کنید.';
            n.each(function() {
                if ($(this).is(":hidden")) return t(i, e.length.long, "lg").show(), $("#main").find(".download-list-link, .card-title-link, .card-footer .btn-success").each(function() {
                    var e = $(this);
                    e.attr("href", "#"), e.click(function(e) {
                        e.preventDefault()
                    }), e.attr({
                        title: i,
                        "data-toggle": "tooltip",
                        "data-size": "lg",
                        "data-trigger": "click",
                        "data-html": !0,
                        "data-placement": "left"
                    })
                }), !1
            })
        }(e.toast)
    }(application),

I tried with soft98.ir##script:inject(abort-on-property-read.js, $, n) but it shows picture 3, linked above.

@okiehsch
Copy link
Contributor

I am sorry, but I have no clue what I am looking at, I can't read Farsi and all I can tell you is that the
Adblock-Iran list is causing the issue, without it I don't get the "adblock-message" and the "stuff" in your screenshot appears on my end.

You should really report it at https://github.com/farrokhi/adblock-iran.

@nimasaj
Copy link
Author

nimasaj commented Jul 24, 2018

@okiehsch, thanks for taking a look at it.
I'm not using that list (Adblock-Iran). I'm using only http://mynext.pro/BLF.txt beside default setup.

Issue is coming from that part of script that I pasted a copy in my first post.
Following line, which has text in Farsi, is just the message that is shown on popup, and it asks to disable adblock and reload the page.
var i = 'جهت مشاهده لینک، افزونه حذف تبلیغات را غیرفعال و بعد <a class="tooltip-link" href="#" onclick="location.reload();return false;">بارگذاری مجدد</a> کنید.';

There is nothing in source of page related to this issue. It is coming from soft98.ir/templates/soft98_default/js/jquery.min.js.

@okiehsch
Copy link
Contributor

If I enable Adblock-Iran I have to allow
soft98.ir/templates/soft98_default/js/jquery.min.js and
disable cosmetic filtering for the site, I then have no obvious issue.

@okiehsch
Copy link
Contributor

okiehsch commented Jul 24, 2018

If I enable http://mynext.pro/BLF.txt

@@||soft98.ir^$generichide
soft98.ir##.adx-image
soft98.ir##.adx-link

seems to work on my end.

@nimasaj
Copy link
Author

nimasaj commented Jul 24, 2018

Yes, disabling cosmetic filtering solves the issue, but allows ads to be seen there. Isn't there any other way to disable Anti-Adblock on this domain (script injection)?

I tried with Adblock-Iran only (and disabling mynext.pro/BLF.txt) and disabling cosmetic filtering, still there is a problem as picture 3 is showing.

With your solution on 4th comment, ads will be visible again on main page soft98.ir (top of the page and also right pane)

Edit.1 - I updated pictures in the first post to make them easy to follow and clear.

@okiehsch
Copy link
Contributor

tried with Adblock-Iran only (and disabling mynext.pro/BLF.txt) and disabling cosmetic filtering, still there is a problem as picture 3 is showing.

You have to allow soft98.ir/templates/soft98_default/js/jquery.min.js the Adblock-Iran list has the filter
||soft98.ir/templates/soft98_default/js/$script and that breaks the site.

ads will be visible again on main page

Can you post a screenshot of the ads you see with mynext.pro/BLF.txt enabled and the filters

@@||soft98.ir^$generichide
soft98.ir##.adx-image
soft98.ir##.adx-link

added to your filter list.

@nimasaj
Copy link
Author

nimasaj commented Jul 24, 2018

This is an image with your proposed filters:
https://cdn.pbrd.co/images/HvRKqAh.png

It could be fixed with following filters, but isn't there any way to make a script injection rule for such cases?

soft98.ir#@#*[id^="adx"]
soft98.ir#@#*[class^="adx"]
soft98.ir##div[class^="adx-"]
soft98.ir##.adx-image
soft98.ir##.adx-link
soft98.ir##.adx__inner

@okiehsch
Copy link
Contributor

okiehsch commented Jul 24, 2018

The detection is inside soft98.ir/templates/soft98_default/js/jquery.min.js, any aborted function will in all likelyhood break the script and lead to your third screenshot https://cdn.pbrd.co/images/HvRvlOG.png.

You can try to find a fix using script injection rules, but why waste your time if you can simply use the filters you posted?

@nimasaj
Copy link
Author

nimasaj commented Jul 24, 2018

Thank you @okiehsch ,

@nimasaj nimasaj closed this as completed Jul 24, 2018
@nimasaj
Copy link
Author

nimasaj commented Sep 3, 2018

Issue is back, so I open this topic again.
A script on website is checking for ".adx1". var t = $(".adx1, .adx1 *");
I have fixed most of the issue by following filters, in my list http://mynext.pro/uBOPa.txt.

soft98.ir##div[class="row"]:if(div>div[class="col-lg pl-0 pr-0 pl-sm-3 pr-sm-3 pr-sm-3"])
soft98.ir##div[class="row"]:if(div>div[class="col-lg pt-3 pl-0 pr-0 pl-sm-3 pr-sm-3 pt-lg-0 pr-lg-0"])
soft98.ir##div[class="col-12 col-lg"]:if(div>div[class^="adx"])
soft98.ir##section[class="card d-block bg-light"]:if(section>header>h4:has-text(پشتیبان سرور سافت))
soft98.ir##section[class="card bg-light"]:if(section>header>h4:has-text(مکان تبلیغات))

but these are temporary fixed and still ads in other pages of website could not be blocked with cosmetic filtering. A sample link is: https://soft98.ir/software/pdf/2165-iceni-technology-infixpro-pdf-editor.html

This image is showing the issue: https://cdn.pbrd.co/images/HCcdGBr.png

Script is loaded from soft98.ir/templates/soft98_default/js/jquery.min.js, and a copy of decrypted script is available at http://pasted.co/de858c1a.

I think this part of script is checking for loading ads:

    function(e) {
        $($("html")[0].shadowRoot).find("style").remove();
        var t = $(".adx1, .adx1 *");
        t.on("contextmenu mousedown", function(e) {
            e.preventDefault()
        });
        var n = 'جهت مشاهده لینک، افزونه حذف تبلیغات را غیرفعال و بعد <a class="tooltip-link" href="#" onclick="location.reload();return false;">بارگذاری مجدد</a> کنید.';
        t.each(function() {
            var t = $(this).offset().left;
            if ($(this).is(":hidden") || t < 0 || t > $(window).width()) return e.toast(n, e.length.long, "lg").show(), $("#main").find(".download-list-link, .card-title-link, .card-footer .btn-success").attr("href", "#").click(function(e) {
                e.preventDefault()
            }).attr({
                title: n,
                "data-toggle": "tooltip",
                "data-size": "lg",
                "data-trigger": "click",
                "data-html": !0,
                "data-placement": "left"
            }), !1
        })
    }

@nimasaj nimasaj reopened this Sep 3, 2018
@mapx-
Copy link
Contributor

mapx- commented Sep 3, 2018

try

soft98.ir##.adx-image
soft98.ir##+js(setTimeout-defuser.js, (), show)

@nimasaj
Copy link
Author

nimasaj commented Sep 3, 2018

It stops the nag, but links (in all pages, including homepage) will be disabled. Have a look at these images please.

https://gcdn.pbrd.co/images/HCd2PBq.png
https://gcdn.pbrd.co/images/HCd2TPN.png
https://gcdn.pbrd.co/images/HCcX528.png

@mapx-
Copy link
Contributor

mapx- commented Sep 3, 2018

using only default setup + iran list + my filters above I get no issues

edit: right ..the links are dead

@nimasaj
Copy link
Author

nimasaj commented Sep 3, 2018

I updated my previous comment to put new images, please have a look at them again. Iran list has removed filters related to this website. Although to make sure I tried again with your suggested setup, and links are disabled (redirected). Please check and compare the links with and without adblocker.

@okiehsch
Copy link
Contributor

okiehsch commented Sep 3, 2018

@@||soft98.ir^$generichide
soft98.ir##div[class="row"]:if(div>div[class="col-lg pl-0 pr-0 pl-sm-3 pr-sm-3 pr-sm-3"])
soft98.ir##div[class="row"]:if(div>div[class="col-lg pt-3 pl-0 pr-0 pl-sm-3 pr-sm-3 pt-lg-0 pr-lg-0"])
soft98.ir##div[class="col-12 col-lg"]:if(div>div[class^="adx"])
soft98.ir##section[class="card d-block bg-light"]:if(section>header>h4:has-text(پشتیبان سرور سافت))
soft98.ir##section[class="card bg-light"]:if(section>header>h4:has-text(مکان تبلیغات))
soft98.ir##.adx-image:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)

seems to work on my end with a default setup.

@nimasaj
Copy link
Author

nimasaj commented Sep 3, 2018

@okiehsch , yes this one works. soft98.ir##.adx-image:style(height: 0px !important; width: 0px !important; visibility: collapse !important;) thanks.
Although, If by any chance it was possible to stop the script it would be great. This part is culprit e.preventDefault(), or:

if ($(this).is(":hidden") || t < 0 || t > $(window).width()) return e.toast(n, e.length.long, "lg").show(), $("#main").find(".download-list-link, .card-title-link, .card-footer .btn-success").attr("href", "#").click(function(e) {
                e.preventDefault()
            })

affected parts are: .download-list-link, .card-title-link, .card-footer .btn-success

@mapx-
Copy link
Contributor

mapx- commented Sep 3, 2018

What if you use only
||ironia.ml/$image,domain=soft98.ir,redirect=3x2-transparent.png

@nimasaj
Copy link
Author

nimasaj commented Sep 3, 2018

regarding ||ironia.ml/$image,domain=soft98.ir,redirect=3x2-transparent.png,
yes, but it leaves a big ad-placeholder left, as shown in this image, https://cdn.pbrd.co/images/HCdelFi.png

@nimasaj
Copy link
Author

nimasaj commented Sep 3, 2018

Filter by @okiehsch fixed the issue. I'm closing this topic. Thanks to both of you for helping.

@nimasaj nimasaj closed this as completed Sep 3, 2018
@okiehsch
Copy link
Contributor

okiehsch commented Sep 3, 2018

@nimasaj just fyi,
like I said, there is high probabilty of site breakage if you try to disable part of
soft98.ir/templates/soft98_default/js/jquery.min.js with a script-injection filter.

@nimasaj
Copy link
Author

nimasaj commented Sep 3, 2018

@okiehsch , if this script is written this much hard to break and invulnerable . Then we would see more and more websites using similar methods to protect themselves from Adblockers.

@okiehsch
Copy link
Contributor

okiehsch commented Sep 3, 2018

If you include the anti-adblock script with your basic jquery functionality it makes it indeed harder/impossible to circumvent with an "abort some function/inline-script" filter.
setTimeout/Interval, addEventListener or set-constant filters are your best bet of a working filter in such cases.
There may very well be such a working filter for this issue, but why waste your time to find such a filter if you can fix the issue by a :style filter.

nimasaj added a commit to nimasaj/uBOPa that referenced this issue Sep 4, 2018
@nimasaj
Copy link
Author

nimasaj commented Dec 28, 2018

Issue is back again. Thus I open this topic if anyone could come up with a solution.

Click to expand related section. .

URL: https://soft98.ir/templates/soft98_default/js/jquery.min.js

They changed var t value.

    function(e) {
        $($("html")[0].shadowRoot).find("style").remove(), $("style:contains(important)").remove();
        var t = $(".adx, .adx > *");
        t.on("contextmenu mousedown", function(e) {
                e.preventDefault()
            }),
            function n() {
                try {
                    if (e.viewport.is(">= md")) {
                        var i = 'جهت مشاهده لینک، افزونه حذف تبلیغات را در مرورگر خود غیرفعال و <a class="tooltip-link" href="#" onclick="location.reload();return false;">صفحه را دوباره بارگذاری</a> کنید.';
                        t.each(function() {
                            var e = $(this),
                                t = e.attr("style");
                            if (e.is(":hidden")) throw i;
                            var n = e.offset().left;
                            if (n < 0 || n > $(window).width()) throw i;
                            if (-1 !== e.css("visibility").indexOf("hidden")) throw i;
                            if (e.width() < 1) throw i;
                            if (e.height() < 1) throw i;
                            if (t && -1 !== t.indexOf("adguard")) throw i;
                            if (!$.trim(e.html())) throw i
                        })
                    }
                    setTimeout(n, 3e3)
                } catch (t) {
                    e.toast(t, e.length.long, "lg").show(), $("#main").find(".download-list-link, .card-title-link, .card-footer .btn-success").attr("href", "#").click(function(e) {
                        e.preventDefault()
                    }).attr({
                        title: t,
                        "data-toggle": "tooltip",
                        "data-size": "lg",
                        "data-trigger": "click",
                        "data-html": !0,
                        "data-placement": "left"
                    })
                }
            }()
    }(application),

.

Filters which were working previously, but not anymore:
||kaprila.com*/show.*$third-party
soft98.ir##div[class="row"]:if(div>div[class="col-lg pl-0 pr-0 pl-sm-3 pr-sm-3 pr-sm-3"])
soft98.ir##div[class="row"]:if(div>div[class="col-lg pt-3 pl-0 pr-0 pl-sm-3 pr-sm-3 pt-lg-0 pr-lg-0"])
soft98.ir##section[class="card d-block bg-light"]:if(section>header>h4:has-text(پشتیبان سرور سافت))
soft98.ir##section[class="card bg-light"]:if(section>header>h4:has-text(مکان تبلیغات))
soft98.ir##.adx-image:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)
soft98.ir##div[class="col-12 col-lg"]:if(div>div[class^="ad2"])
soft98.ir##div[class="col-12 col-lg"]:if(div>div[class^="acdb"])
soft98.ir##div[class="col-12 col-lg"]:if(div>div[class^="adx"])
soft98.ir##div[class="col-12 col-lg"]:if(div>div[class^="adzb"])
soft98.ir##div[class="col-12 col-lg"]:if(div>div>a[title*="زولا"])
soft98.ir##div[class="col-12 col-lg"]:if(div>div>a[href*="/bit.ly/"])
soft98.ir##div[class="container ad2b"]:if(div>div[class^="ad2"])
soft98.ir##div[class="container acdb"]:if(div>div[class^="acdb"])
soft98.ir##div[class="container acdb"]:if(div>div>a[title*="سونی"])
soft98.ir##div[class="container adzb"]:if(div>div[class^="adzb"])
soft98.ir##a[href*="/bit.ly/"]:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)
soft98.ir##a[href*="/clc.to/"]:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)
soft98.ir##a[href*="/dfile.ir/make/"]:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)
soft98.ir##*[class^="acdb "]:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)
soft98.ir##*[class^="ad2b "]:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)
soft98.ir##*[class^="adzb "]:style(height: 0px !important; width: 0px !important; visibility: collapse !important;)
.

Google Chrome Version 70.0.3538.110 (Official Build) (64-bit)
uBlock Origin v1.17.4
.

@nimasaj nimasaj reopened this Dec 28, 2018
@okiehsch
Copy link
Contributor

okiehsch commented Dec 28, 2018

What about

@@||soft98.ir^$generichide
||kaprila.com*/show.*$third-party
soft98.ir##.adx-image:style(height: 1px !important; width: 1px !important; visibility: collapse !important;)
soft98.ir##.adx-images:style(height: 1px !important; width: 1px !important; visibility: collapse !important;)

I used https://soft98.ir/software/office/365-notepad.html to test.

@nimasaj
Copy link
Author

nimasaj commented Dec 28, 2018

You're right. Based on your suggestion, the following ones are working.

||kaprila.com*/show.*$third-party
soft98.ir##*[class="col-lg pl-0 pr-0 pl-sm-3 pr-sm-3 pr-sm-3"]
soft98.ir##*[class^="adx-image"]:style(height: 1px !important; width: 1px !important; visibility: collapse !important;)
soft98.ir##*[class="col-lg pt-3 pl-0 pr-0 pl-sm-3 pr-sm-3 pt-lg-0 pr-lg-0"]:style(height: 1px !important; width: 1px !important; visibility: collapse !important;)
soft98.ir##*[class="card d-block bg-light"]:style(height: 1px !important; width: 1px !important; visibility: collapse !important;)

Though, I couldn't make id="sidebar_sticky" hidden, shown in following image, but that one is not that important if there is no easy fix for it.
https://gcdn.pbrd.co/images/HTSEIj0.png

Thanks @okiehsch

@nimasaj nimasaj closed this as completed Dec 28, 2018
@smed79
Copy link
Contributor

smed79 commented Dec 29, 2018

@SlashArash @farrokhi fyi.

farrokhi added a commit to farrokhi/adblock-iran that referenced this issue Jan 1, 2019
@rh1363
Copy link

rh1363 commented Jan 4, 2019

WoW!!!
The Problem is back again!
All the Adds Coming Back again!
https://soft98.ir/
Please Update the blocking List.

@mapx-
Copy link
Contributor

mapx- commented Jan 4, 2019

Be sure you are using this list:
https://github.com/farrokhi/adblock-iran

@nimasaj
Copy link
Author

nimasaj commented Jan 4, 2019

@rh1363, New ads are covered. Please update your list and check again.

@mapx-
Copy link
Contributor

mapx- commented Jan 4, 2019

@rh1363 and maybe you should use uBo

@rh1363
Copy link

rh1363 commented Jan 4, 2019

thank you
the adds is disappeared. but, the scripts that hidden links is still active!
in this page:
https://soft98.ir/software/cd-dvd-tools/2143-cdex.html
the adds is still alive!
the soft98.ir is really ...***....!!!

@nimasaj
Copy link
Author

nimasaj commented Jan 4, 2019

@rh1363 check again please. By the way, there is no hidden link for me. In case you're using some other Farsi lists, un-mark them and check again. I do not get any hidden link with my list + default lists on uBO.

@rh1363
Copy link

rh1363 commented Jan 4, 2019

I Update the List, but the problem change again and I saw some adds!
https://pasteboard.co/HUVKfmR.jpg
would you please revise the list blocking codes of soft98.ir?
there is a suspicious problem!

edit:
I update again just now and adds disappeared!
but there was a long gap at the bottom of site.

@mapx-
Copy link
Contributor

mapx- commented Jan 4, 2019

@rh1363 are you using uBo or ABP ? remove ABP and keep only uBo then test again

@mapx-
Copy link
Contributor

mapx- commented Jan 4, 2019

ok., I see you are using uBo now

@rh1363
Copy link

rh1363 commented Jan 4, 2019

I'm Using uBlock Origin and uBOPa filter list.
WoW!
Surprisingly the add:
https://pasteboard.co/HUVKfmR.jpg
coming back again!!!
why this crazy things happen?!

@rh1363
Copy link

rh1363 commented Jan 5, 2019

Hi
I Update uBOPa filter list Just now.
Surprisingly, the script of soft98.ir is active and the whole site is disabled!
Please Update....

@mapx-
Copy link
Contributor

mapx- commented Jan 5, 2019

What list is this one: uBOPa => it's IRN: Adblock-Iran or something else ? address ?

@nimasaj
Copy link
Author

nimasaj commented Jan 5, 2019

@mapx- Either he is the maintainer of that website, or website developer is monitoring this topic. Since he commented here, everytime I made a change in filter list, website blocked it immediately. It doesn't make sense to make any more changes to fix that website, at least for now.

He was using my filter list (uBOPa) on this address: soft98.ir

@farrokhi
Copy link

farrokhi commented Jan 5, 2019

I had the same experience that someone was reporting this to me and as soon as I released an updated and asked him to test, they change the website in like 10 minutes to render the filterlist ineffective. I had the feeling that the reported was the owner or developer of the website.
I suggest we find an alternative method to block the ads on this specific site.

@rh1363
Copy link

rh1363 commented Jan 5, 2019

What list is this one: uBOPa => it's IRN: Adblock-Iran or something else ? address ?

https://cdn1.imggmi.com/uploads/2019/1/5/537452959c6a05df927b5dbf96a7b0e0-full.jpg

@rh1363
Copy link

rh1363 commented Jan 5, 2019

@mapx- Either he is the maintainer of that website, or website developer is monitoring this topic. Everytime I made a change in filter list, website changed immediately. It doesn't make sense to make any more changes to fix that website, at least for now.

He was using my filter list (uBOPa) on this address: soft98.ir

Thus
would you please instruct me how to identify script and block it?
and also instruct how to find correct add line code for disabling adds.

You make good and throw it into the river, then God will back you at the desert! (a well known Iranian saying! :D)

@rh1363
Copy link

rh1363 commented Jan 5, 2019

I had the same experience that someone was reporting this to me and as soon as I released an updated and asked him to test, they change the website in like 10 minutes to render the filterlist ineffective. I had the feeling that the reported was the owner or developer of the website.
I suggest we find an alternative method to block the ads on this specific site.

WoW!
Believe me I'm not the developer of soft98!
I'm a simple worker! :D
.
You right.
we have to find new method.
I hate people that want to feeeeeed innocent users the damn advertisements!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants