当前位置:网站首页>【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.将地址放到下载器
边栏推荐
猜你喜欢
pytroch、tensorflow对比学习—搭建模型范式(构建模型方法、训练模型范式)
数据湖:数据同步工具NiFi
SL-12/2过流继电器
混合型界面:对话式UI的未来
pytroch、tensorflow对比学习—专栏介绍
Malicious attacks on mobile applications surge by 500%
类神经网络训练不起来怎么办
II. Binary tree to Offer 68 - recent common ancestor
leetcode43 string multiplication
(2022 Niu Ke Duo School IV) N-Particle Arts (Thinking)
随机推荐
leetcode125 验证回文串
备战金九银十,如何顺利通过互联网大厂Android的笔面试?
Selenium:弹窗处理
七、MFC序列化机制和序列化类对象
[target detection] YOLOv7 theoretical introduction + practical test
2022年超全的Android面经(附含面试题|进阶资料)
小心你的字典和样板代码
Selenium:操作Cookie
Selenium: Introduction
I met a shell script
第5章——以程序方式处理MySQL数据表的数据
LeetCode 9. 回文数
Qt Widget project loading example of qml
The solution to the inconsistency between the PaddleX deployment inference model and the GUI interface test results
MySQL-DML language-database operation language-insert-update-delete-truncate
可视化全链路日志追踪
NDK does not contain any platforms问题解决
torch
Selenium:鼠标、键盘事件
PaddleX部署推理模型和GUI界面测试结果不一致的解决方法