釘釘直播回放下載


更新 20230221


現在抓包已經抓不到這個鏈接了,不過在打開回放時會有一個請求 /group-live-share/index.htm?liveUuid=xxx

把這個請求拼接上去到下面的鏈接依舊可以打開網頁版

不過獲取到的 m3u8 鏈接依舊是無法直接下載的

寫了個腳本來自動化該流程,可在 https://github.com/akkuman/ding_playback_downloader 獲取


原始記錄 20220907


想下載釘釘直播回放,管理員設置了禁止下載

找到了這篇文章

[[原創]釘釘如何下載管理員禁止的直播回放(抓包分析)-軟件逆向-看雪論壇-安全社區|安全招聘|bbs.pediy.com](https://bbs.pediy.com/thread-274002.htm)

打開burp,配置好burp證書,然後使用proxifier將釘釘主程序 DingTalk.exe 的流量全部轉發到 burp 代理端口。打開直播回放,點開直播

按照文章中的尋找,只找到了下面這個鏈接

image

解碼出來獲取到了

image

其中有個 publicLandingUrl https://h5.dingtalk.com/group-live-share/index.htm?type=2&liveFromType=6&liveUuid=xxxx&bizType=dingtalk&dd_nav_bgcolor=FF2C2D2F#/union

瀏覽器打開這個鏈接,可以看到直播回放

播放視頻,打開f12進行抓包,可以看到一個鏈接

https://dtliving-sh.dingtalk.com/live_hp/xxxx_merge.m3u8?auth_key=xxxxxx

這個鏈接中,xxxx是上面liveUuid,然後會看到一個m3u8,然後使用其他的工具下載併合並m3u8即可

其實上面的json中的 liveUrlHls ****中的auth_key可以用在拼接m3u8鏈接上,但是發現下載 liveUrlHls 需要單點登錄(不知道這是不是我們公司的配置),而下載上面m3u8鏈接需要網頁登錄後cookie中PC_SESSION值

所以還是直接打開網頁後使用idm之類的軟件進行下載吧。

給出一份mitmproxy的腳本

from mitmproxy import http
from mitmproxy import ctx
import re
import json

pattern = re.compile(r'\[live\-playback\-room\].+?\[response\](\{.+\})')

def request(flow: http.HTTPFlow) -> None:
    # if flow.request.pretty_host != 'retcode.taobao.com':
    #     return
    if not flow.request.path.startswith('/r.png'):
        return
    msg = flow.request.query.get('msg')
    if not msg:
        return
    if not pattern.match(msg):
        return
    data = pattern.search(msg)[1]
    try:
        data = json.loads(data)
    except Exception:
        return
    live_info = data.get('liveInfo')
    if not live_info:
        return
    live_uuid = live_info.get('liveUuid')
    ctx.log.info(f'獲取到 liveUuid {live_uuid}')
    live_url_hls = live_info.get('liveUrlHls')
    ctx.log.info(f'獲取到 liveUrlHls {live_url_hls}')
    ctx.log.inof(f"請打開網頁使用IDM進行下載: {live_info.get('publicLandingUrl')}")

自動化的方案,之後再花時間研究

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章