当前位置:网站首页>【FiddlerScript】利用FiddlerScript抓包保利威下载
【FiddlerScript】利用FiddlerScript抓包保利威下载
2022-08-01 05:26:00 【小白大侠Leo】
目标站点 王派医学官网 医考选王派,拿证就是快
脚本原理就是删除key链接中的playsafe
最终效果
准备的工具
1.浏览器
2.配置好证书的Fiddler,可以看我b站视频【跟着新手学抓包】第003集如何配置中文版Fiddler_哔哩哔哩_bilibili
放置代码
1.首先打开Fiddler,切换到FiddlerScript
2.在第一行加上这段代码
import System.Text.RegularExpressions;
3.点击跳转:OnBeforeRequest
3.在OnBeforeRequest前面加上这段代码
public static RulesOption("捕获blv")
BindPref("fiddlerscript.rules.BLV")
var m_isBLV: boolean = false;
4.在OnBeforeRequest里面加上这段代码
if(oSession.fullUrl.Contains("https://hls.videocc.net/playsafe") && oSession.fullUrl.Contains("key")){
oSession.fullUrl = oSession.fullUrl.Replace("/playsafe","");
}
5.点击跳转:OnBeforeResponse
6.在OnBeforeReseponse里面加上这段代码
if(m_isBLV){
if(oSession.fullUrl.Contains("https://hls.videocc.net") && oSession.fullUrl.Contains("m3u8")){
oSession.utilDecodeResponse();
var body = oSession.GetResponseBodyAsString();
if(body.IndexOf("#EXT-X-STREAM-INF")!=-1){
var m3u8Url = oSession.fullUrl;
var baseUrl = oSession.fullUrl.Substring(0,oSession.fullUrl.IndexOf(".m3u8"))
var r = new Regex('_(.*?desktop)');
FiddlerObject.log(body);
var mc = r.Match(body);
if(mc.Groups[1].Value == ""){
//没有匹配到,不再执行后面的代码
FiddlerObject.log("[异常]:获取m3u8Url正则失败,请联系开发者QQ:2908436596");
return;
}
var dUrl = mc.Groups[1].Value;
var m3u8Data = baseUrl +"_"+ dUrl;
FiddlerObject.log("成功获取最高清晰度m3u8URL为:");
FiddlerObject.log(m3u8Data)
}
}
}
if(m_isBLV && oSession.fullUrl.Contains("hls.videocc.net") && oSession.fullUrl.Contains("key?token") ){
FiddlerObject.log(Fiddler.Utilities.ByteArrayToString(oSession.ResponseBody))
var keyBytes = Fiddler.Utilities.ByteArrayToString(oSession.ResponseBody)
var base64Data = Convert.ToBase64String(oSession.ResponseBody)
FiddlerObject.log("base64:"+base64Data)
}
使用流程
1.点击规则->捕获blv,前面有勾代表开启,没有代表关闭
2.切换到日志面板,右键->清除
3.登录网站,点击视频,地址自吐
4.将地址放到下载器
边栏推荐
- 备战金九银十,如何顺利通过互联网大厂Android的笔面试?
- 小白的0基础教程SQL: 关系数据库概述 02
- Error: AttributeError: module 'matplotlib' has no attribute 'figure'
- PAT serie b write the number 1002
- 深度比较两个对象是否相同
- Speed up your programs with bitwise operations
- 2022/07/29 入职健海JustFE团队,我学到了高效开发(年中总结)
- 4D line-by-line analysis and implementation of Transformer, and German translation into English (3)
- Selenium:上传、下载文件
- LeetCode 27. 移除元素
猜你喜欢
随机推荐
NDK does not contain any platforms problem solving
vsce package 后出现 Command failed: npm list --production --parseable --depth=99999 --loglevel=error异常
matplotlib pyplot
第5章——以程序方式处理MySQL数据表的数据
y83. Chapter 4 Prometheus Factory Monitoring System and Actual Combat -- Advanced Prometheus Alarm Mechanism (14)
Selenium: form switching
Selenium:鼠标、键盘事件
Jupyter shortcuts
II. Binary tree to Offer 68 - recent common ancestor
权重等比分配
Speed up your programs with bitwise operations
Selenium:表单切换
Selenium: upload and download files
中国的机器人增长
WPF项目-初步了解数据绑定 binding
state compressed dp
vim configuration + ctag is as easy to read code as source insight
小白的0基础教程SQL: 什么是SQL 01
The solution to the inconsistency between the PaddleX deployment inference model and the GUI interface test results
[Translation] Securing cloud-native communications: From ingress to service mesh and beyond