nimasaj / uBOPa

Filterlist to block ads. Compatible with most ad blockers, but specifically written for uBlock Origin
MIT License
31 stars 3 forks source link

mihanfile.net timer #19

Closed MasterKia closed 2 years ago

MasterKia commented 2 years ago

https://mihanfile.net/5ee83a071e439bc8

The website has a 201 seconds countdown timer.

mihanfile.net##+js(set, seconds, 0) sets the timer to 0 but when I click on "حالا بصورت رایگان دانلود کنید" it doesn't work. I don't think it's a server-side timer because this code that manages the timer can be found in the client-side code:

<script>

    var milisec = 0;
    var seconds = 201;

    function display()
    {
        $('.btn-free-element').hide();
        $('.download-timer').show();
        if (seconds == 0)
        {
            $('.download-timer').html("<a class='btn btn-secondary btn-lg btn-block' href='https://mihanfile.net/5ee83a071e439bc8?pt=U2tSR1YxZGtPVlZNZVdWR2F6ZDJaSFl4Um1OWWR6MDlPa3NrR05RdENLNnhaZldZK29mL1JVUT0%3D'>download now</a>");
        }
        else
        {
            $('.download-timer-seconds').html(seconds);
        }
        seconds--;
    }

    $(document).ready(function() {
        display();
        $('.download-timer-seconds').html(201);
        countdownTimer = setInterval('display()', 1000);
    });

</script>
nimasaj commented 2 years ago

As it seems the timer on the client side is just to inform the user. There is another timer that checks the validity of the download link, in this case the following link, before it's accessible.

https://mihanfile.net/5ee83a071e439bc8?pt=U2tSR1YxZGtPVlZNZVdWR2F6ZDJaSFl4Um1OWWR6MDlPa3NrR05RdENLNnhaZldZK29mL1JVUT0%3D

The download link is already generated and is available in the source of the page, but, presumably, requires a server validation. If you open that link before the timer ends, the session will be restarted.