VideoHelp Forum
+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Psychology student CrymanChen's Avatar
    Join Date
    Apr 2022
    Location
    Mainland China
    Search Comp PM
    Hey guys,
    Just met a problem of logging in.
    I mean, not about downloading videos but I can't even log in.

    Everything went normal on Chrome, and the parameters are not fastly-expired. But on Python, always Access Denied.

    Would anyone be willing to help?
    Password will be changed in the near future in case of security.
    ---[base64 encoded]---
    Email: [deleted]
    Password: [deleted]
    ---[base64 encoded]---

    My debugging code:
    Code:
    from curl_cffi import requests
    
    # Necessary for me.
    proxies = {'http': 'http://127.0.0.1:7890', 'https': 'http://127.0.0.1:7890'}
    
    headers = {
        'sec-ch-ua': '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
        'sec-ch-ua-platform': '"Windows"',
        'Referer': 'https://watch.foxtel.com.au/app/',
        'DNT': '1',
        'sec-ch-ua-mobile': '?0',
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
        'Content-Type': 'application/x-www-form-urlencoded',
    }
    
    data = 'versionNumber=0.1&...(truncated)'
    
    response = requests.post('https://watch.foxtel.com.au/app/api/auth.class.api.php/logon/296', headers=headers, data=data, proxies=proxies, impersonate='chrome120')
    print(response.status_code)
    P.S.
    1. In this thread, I used curl_cffi to disguise myself as Chrome. So here I used the same module in case this site needs tls fingerprint or something else.
    2. After the login on Chrome was successful, I re-played that login request for several times, and the response was HTTP 200 (OK). But when turning to Python, an HTTP 403 returned.
    3. An Australian IP needed.
    Last edited by CrymanChen; 28th Mar 2024 at 07:17. Reason: Mentioned the geo-restriction.
    twitter @Cryman_Chen
    email crymanchen@gmail.com
    Quote Quote  
  2. Psychology student CrymanChen's Avatar
    Join Date
    Apr 2022
    Location
    Mainland China
    Search Comp PM
    Update:
    1. Using selenium to create a Chrome window and then tried to log in:
    Returned 403
    Image
    [Attachment 77970 - Click to enlarge]

    2. In a normal Chrome window:
    Returned 200
    Image
    [Attachment 77971 - Click to enlarge]


    Wh...why? This is so strange��.
    twitter @Cryman_Chen
    email crymanchen@gmail.com
    Quote Quote  
  3. After a quick look, I saw that there's a prelogin (https://watch.foxtel.com.au/app/api/auth.class.api.php/prelogin/296?) that returns a secret:
    Code:
    <?xml version="1.0" standalone="yes" ?>
    <array>
        <secret><![CDATA[42c3e47da29e4497adcd72294b3f0d6b]]></secret>
    </array>
    This secret is then probably required in the login request along with the credentials. I don't have the time to investigate further, but it should at least help you along.
    Quote Quote  
  4. Psychology student CrymanChen's Avatar
    Join Date
    Apr 2022
    Location
    Mainland China
    Search Comp PM
    Originally Posted by stabbedbybrick View Post
    After a quick look, I saw that there's a prelogin (https://watch.foxtel.com.au/app/api/auth.class.api.php/prelogin/296?) that returns a secret:
    Code:
    <?xml version="1.0" standalone="yes" ?>
    <array>
        <secret><![CDATA[42c3e47da29e4497adcd72294b3f0d6b]]></secret>
    </array>
    This secret is then probably required in the login request along with the credentials. I don't have the time to investigate further, but it should at least help you along.
    Yes sir, this secret value is used to hash the password.
    ---
    From my investigation, after the prelogin is successful, a cookie named "bm_sv" will change, and we carry the new "bm_sv" cookie to login.
    But I tried to print all the cookies before and after the prelogin, and found that they were the same.
    twitter @Cryman_Chen
    email crymanchen@gmail.com
    Quote Quote  
  5. Psychology student CrymanChen's Avatar
    Join Date
    Apr 2022
    Location
    Mainland China
    Search Comp PM
    Problem solved. Thank y'all.
    twitter @Cryman_Chen
    email crymanchen@gmail.com
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!