0

In this website when the time expires, it automatically switches to the next video like this : nextVideoError

This website Uses this to check the time (as far as I know, I pretty new to this subject)

<script>
            function t() {
                setInterval(function () {
                    $.ajax({
                        url: "src/chk_login.php",
                        type: 'POST',
                        async: false,
                        data: {barcode: '758381952'},
                        success: function (data, textStatus, jqXHR) {
                            if (data.trim() == "no") {
                                window.location = "logout.php";
                            }
                        },
                        error: function (jqXHR, textStatus, errorThrown) {
                            alert(errorThrown);
                        },
                    });
                }, 3000);

                setInterval(function () {
                    $.ajax({
                        url: "check_time.php",
                        type: 'POST',
                        async: false,
                        data: {cid: '459'},
                        success: function (data, textStatus, jqXHR) {

                            if (data.trim() == "0") {
                                location.reload();
                            }
                        },
                        error: function (jqXHR, textStatus, errorThrown) {
                            alert(errorThrown);
                        },
                    });
                }, 5000);
            }
        </script>

and here is the response

Request URL: https://www.random.com/lec/check_time.php
Request Method: POST
Status Code: 200 
Remote Address: 62.171.180.251:443
Referrer Policy: strict-origin-when-cross-origin
access-control-allow-credentials: true
access-control-allow-methods: POST
access-control-allow-origin: *
cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
content-type: text/plain; charset=utf-8
date: Sun, 13 Dec 2020 04:12:47 GMT
expires: Thu, 19 Nov 1981 08:52:00 GMT
pragma: no-cache
server: nginx
x-powered-by: PHP/5.6.40
x-powered-by: PleskLin
:authority: www.random.com
:method: POST
:path: /lec/check_time.php
:scheme: https
accept: */*
accept-encoding: gzip, deflate, br
accept-language: en-GB,en-US;q=0.9,en;q=0.8
content-length: 7
content-type: application/x-www-form-urlencoded; charset=UTF-8
cookie: PHPSESSID=n2snkkfcood8c3fj2jdsjveav5
origin: https://www.random.com
referer: https://www.random.com/lec/video.php?date=2020-12-12&cid=459
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: same-origin
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36
x-requested-with: XMLHttpRequest
cid: 459

enter image description here Here is the check_time.php

<html>
<head>
<style type="text/css">
.resize-observer[data-v-b329ee4c]{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%;border:none;background-color:transparent;pointer-events:none;display:block;overflow:hidden;opacity:0}.resize-observer[data-v-b329ee4c] object{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}</style>
</head>
<body data-new-gr-c-s-check-loaded="14.987.0" data-gr-ext-installed="">
<pre style="word-wrap: break-word; white-space: pre-wrap;">
1
</pre>
</body>
</html>

What I can do to reverse the time in the response?can I do it by building a fake check_time.php on a another host which response, the time I want and,replace the url of the first script,by inspect element? Is it possible or should I build A TIME MACHINE? ;)

(Pardon me for my silly use of the English Language)

Ali Kianoor
  • 1,167
  • 9
  • 18
Xtizi
  • 3
  • 5
  • so you're trying to circumvent a measure put into place on a website written by someone else? I would say that your best bet is to manipulate the site client side with something like tampermonkey; trying to inject yourself into the website's data stream and redirect it or fake the site with scripts from another source could be considered hacking, and isn't likely to get good responses here. – Claies Dec 13 '20 at 05:02
  • Thank you for your comment I will try it and let you know! – Xtizi Dec 13 '20 at 12:40

0 Answers0