接口地址

https://jx.aidouer.net/?url=
https://sb.5gseo.net/?url=
https://www.116811.com/plugin.php?id=vipvideo:index

视频教程

https://www.bilibili.com/video/BV1dt4y1b7ED/

python代码

# -*- coding:utf-8 -*-
# @Author: Null119 微信公众号【治廷君】
# @Desc  : { 云解析-jx.aidouer.net }
# @Time  : 2022/6/15 21:55

'''
var Key1 = AES_ECB(Key,$.md5(Vkey));
var Key2 = XXTEA.encryptToBase64(Key, Key1);
var Sign = encode_url(lc($.md5(Domain+Host+Time+Vurl+Key+Key1)),'971a0e7224fecb61b1868f1211a6360d');
var Sign1 = AES_ECB(Sign,$.md5(Vkey));
var Sign2 = XXTEA.encryptToBase64(Sign, Sign1);
var Token = encode_url(lc($.md5(Domain+Host+Time+Vurl+Key+Key1+Sign+Sign1)),Time+'52bc46dec47a199abc82793bfabe56f6');
var Token1 = AES_ECB(Token,$.md5(Vkey));
var Token2 = XXTEA.encryptToBase64(Token, Token1);
'''

import requests,re,urllib3,time,hashlib,execjs,json
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

ctx = execjs.compile(open('./aidouer.js').read())

r=requests.Session()

def md5(str):
    return hashlib.md5(str.encode(encoding='UTF-8')).hexdigest()

def getIpmd5():
    url = r'http://www.3322.org/dyndns/getip'
    resp = requests.get(url).text.strip()
    ip=resp.split('.')
    return md5(f'{ip[0]}.{ip[1]}.000.000')

def getVipUrl(url):
    url=f'https://jx.aidouer.net/?url={url}'
    rurl=url
    appkey = 'dc49f6067ec7e71c62aad71c5b727c62'
    resp=r.get(url,verify=False).text
    resp=resp.replace('\t','').replace('\n','').replace('\r','').replace(' ','')
    Time=re.search('Time="(.*?)"',resp).group(1)
    Version = re.search('Version="(.*?)"', resp).group(1)
    Vurl = re.search('Vurl="(.*?)"', resp).group(1)
    Vkey = re.search('Vkey="(.*?)"', resp).group(1)
    Key = re.search('Key="(.*?)"', resp).group(1)
    #nKey=re.findall("encode_url.*?'(.*?)'",resp)
    SignKey= '971a0e7224fecb61b1868f1211a6360d'
    TokenKey = '52bc46dec47a199abc82793bfabe56f6'
    Domain ='jx.aidouer.net'
    Host ='jx.aidouer.net'

    Ipmd5=getIpmd5()
    print(f'================Start=================')
    print(f'Ipmd5: \t{Ipmd5}')
    print(f'Time: \t{Time}')
    print(f'Vurl: \t{Vurl}')
    print(f'Vkey: \t{Vkey}')
    print(f'Key: \t{Key}')
    print(f'SignKey: \t{SignKey}')
    print(f'TokenKey: \t{TokenKey}')

    enstr = f'AES_ECB("{Key}","{md5(Key)}")'
    Key1 = str(ctx.eval(enstr))
    print(f'Key1: \t{Key1}')

    enstr = f'xxtea_encrypt("{Key}","{Key1}")'
    Key2 = ctx.eval(enstr)
    print(f'Key2: \t{Key2}')

    enstr = f'authEncode("{md5(Domain + Host + Time + Vurl + Key + Key1)}","{SignKey}")'
    Sign = ctx.eval(enstr)
    print(f'Sign: \t{Sign}')

    enstr = f'AES_ECB("{Sign}","{md5(Vkey)}")'
    Sign1 = ctx.eval(enstr)
    print(f'Sign1: \t{Sign1}')

    enstr = f'xxtea_encrypt("{Sign}","{Sign1}")'
    Sign2 = ctx.eval(enstr)
    print(f'Sign2: \t{Sign2}')

    enstr = f'authEncode("{md5(Domain + Host + Time + Vurl + Key + Key1 + Sign +Sign1)}","{Time + TokenKey}")'
    Token = ctx.eval(enstr)
    print(f'Token: \t{Token}')

    enstr = f'AES_ECB("{Token}","{md5(Vkey)}")'
    Token1 = str(ctx.eval(enstr))
    print(f'Token1: \t{Token1}')

    enstr = f'xxtea_encrypt("{Token}","{Token1}")'
    Token2 = ctx.eval(enstr)
    print(f'Token2: \t{Token2}')



    Tokenh0 = f'{Vkey}-{Key}-{Sign}-{Token}'
    Tokenh1 = f'{Key1}-{Sign1}-{Token1}'
    enstr = f'xxtea_encrypt("{Tokenh0+Tokenh1+Key2+Sign2+Token2}","{Host+Domain+Time}")'  #xxtea没有问题
    Tokenh2 = ctx.eval(enstr)

    ckeyData={
        'url': Vurl,
        'wap': "0",
        'ios': "0",
        'host': Host,
        'referer': "",
        'time': Time,
        'key': Key,
        'key1': Key1,
        'sign': Sign,
        'sign1': Sign1,
        'token': Token,
        'token1': Token1
    }
    ckeyStr=json.dumps(ckeyData,separators=(',', ':'))
    enstr=f"AES_CBC('{ckeyStr}','{md5(Tokenh2)}')"
    ckey =  ctx.eval(enstr)
    print(f'ckey: \t{ckey}')

    pdat = {
        "url": Vurl,
        "wap": "0",
        "ios": "0",
        "host": Host,
        "referer": "",
        "time": Time,
        "key": Key,
        "key1": Key1,
        "sign": Sign,
        "sign1": Sign1,
        "token": Token,
        "token1": Token1,
        "ckey": ckey
    }
    pdatStr=json.dumps(pdat,separators=(',', ':'))
    enstr = f"TSTKC('{pdatStr}')"
    Tokenh3 = ctx.eval(enstr)
    print(f'Tokenh0: \t{Tokenh0}')
    print(f'Tokenh1: \t{Tokenh1}')
    print(f'Tokenh2: \t{Tokenh2}')
    print(f'Tokenh3: \t{Tokenh3}')

    url = f'https://jx.aidouer.net/Api.php?ver=V3.0&timestamp={Time}&appkey={appkey}'
    headers= {
        'Accept':'application/json, text/javascript, */*; q=0.01',
        'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8',
        'Referer':url,
        'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063',
        'Origin': 'https://jx.aidouer.net',
        'sec-ch-ua-mobile': '?0',
        'sec-ch-ua-platform': '"Windows"',
        'Sec-Fetch-Dest': 'empty',
        'Sec-Fetch-Mode': "cors",
        'Sec-Fetch-Site': 'same-origin',
        'Vkey': Vkey,
        'Ipmd5': Ipmd5,
        'Version': Version,
        'Access-Token0': Tokenh0,
        'Access-Token1': Tokenh1,
        'Access-Token2': Tokenh2,
        'Access-Token3': Tokenh3,
        'Cookie':f'uuid={Vkey}-{Key}-{Sign}-{Token};'
    }
    resp=r.post(url,data=pdat,headers=headers,verify=False)
    if resp.json()['status']==1:
        rdata=resp.json()['data']
        appkey=resp.json()['appkey']
        Ipmd5=resp.json()['ipmd5']

        enstr = f'AES_CBC_DE("{rdata}","{md5(appkey+Ipmd5)}")'
        derdata = ctx.eval(enstr)
        print(f'deRdata: \t{derdata}')
        enurl=json.loads(derdata)['url']
        print(f'EnUrl: \t{enurl}')

        headers = {
            'Accept': '*/*',
            'Content-Type':'text/html; charset=UTF-8',
            'Referer': rurl,
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063',
            'Cookie':f'uuid={Vkey}-{Key}-{Sign}-{Token};',
        }

        enstr = f'authDecode("{enurl}","{md5(Host + Token)}")'
        deUrl = ctx.eval(enstr)

        enstr = f'deUrl("{deUrl}")'
        url = ctx.eval(enstr)

        resp = r.get(url,headers=headers,allow_redirects=False, verify=False)
        m3u8 = resp.headers['Location']

        print(f'm3u8地址: \t{m3u8}')

        resp = r.get(m3u8,headers=headers,verify=False)
        with open(f'./{Time}.m3u8', 'wb') as F:
            F.write(resp.content)
        print(f'{Time}.m3u8 下载完成.')
    else:
        print(resp.json()['data']['msg'])
    print(f'================End=================')
if __name__ == "__main__":
    url='https://v.qq.com/x/cover/mzc00200p51jpn7/v0043tq177l.html'
    getVipUrl(url)

JS文件下载

请输入暗号查看内容(暗号有效期3天,全站通用)
请关注本站微信公众号,回复“暗号”获取。在微信里搜索公众号“治廷君”或者“ztkjgzs”或者微信扫描右侧二维码关注本站微信公众号。
如果觉得我的文章对你有用,请随意赞赏