当前位置: 首页 > news >正文

Fiddler And LINQ - 特洛伊

Since moving to Google at the beginning of 2016, I’ve gained some perspective about my work on Fiddler over the prior 12+ years. Mostly, I’m happy about what I accomplished, although I’m a bit awed about how much work I put into it, and how big my “little side project” turned out to be.

It’s been interesting to see where the team at Telerik has taken the tool since then. Some things I’m not so psyched about (running the code through an obfuscator has been a source of bugs and annoyance), but the one feature I think is super-cool is support for writing FiddlerScript in C#. That’s a feature I informally supported via an extension, but foolishly (in hindsight) never invested in baking into the tool itself. That’s despite the fact that JScript.NET is a bit of an abomination which is uncomfortable for both proper JavaScript developers and .NET developers. But I digress… C# FiddlerScript is really neat, and even though it may take a bit of effort to port the many existing example FiddlerScript snippets, I think many .NET developers will find it worthwhile.

I’ve long been hesitant about adopting the more fancy features of the modern .NET framework, LINQ key among them. For a while, I justified this as needing Fiddler to work on the bare .NET 2.0 framework, but that excuse is long gone. And I’ll confess, after using LINQ in FiddlerScript, it feels awkward and cumbersome not to.

To use LINQ in FiddlerScript, you must be using the C# scripting engine and you must add System.core.dll inside Tools > Fiddler Options > Scripting. Then, add using System.Linq; to the top of your C# script file.

 

C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll

 

After you make these changes, you can do things like:

    var arrSess = FiddlerApplication.UI.GetAllSessions();
    bool b = arrSess.Any(s=>s.HostnameIs("Example.com"));
    FiddlerApplication.UI.SetStatusText((b) ? "Found it!":"Didn't find it.");

http://www.zskr.cn/news/22453.html

相关文章:

  • 动态加速中优化失败路径反馈的方法
  • 铜价冲击下,如何“锁住”母排利润?
  • 10.16读书报告
  • 元推理:哥德尔搞不完定理,翻来覆去的搞。。。。
  • PostgreSQL社区CUUG 院校行 - 内蒙古农业大学计算机与信息工程学院
  • 2025年铝复合板厂家综合实力排行榜TOP10:一站式服务成行业新趋势
  • 2025年市面上桥架品牌排行榜前十强权威解析
  • 2025年桥架品牌综合实力排行榜:十大优质供应商权威评测
  • 2025 年注浆管生产厂家最新推荐榜:聚焦密封性能,精选优质企业助力工程采购决策岩心管/钢花管/管棚管/注浆管小导管厂家推荐
  • Nx项目中利用Vitest对原生JS组件进行单元测试
  • 2025年10月16日权威信息公布:西安买房必看新楼盘口碑排行榜TOP10权威发布
  • 2025-CodeStar十一综合评估CSP-S
  • JavaScriptDay3
  • 2025 年标识标牌制造厂家最新推荐排行榜:解读行业头部企业产能与技术实力,精选优质品牌供订做参考
  • 四输入六输出的欠驱动系统建模与仿真
  • 手写 bitset 模板
  • 【SPIE出版 | 高校主办,有ISSN、ISBN号 】第四届交通运输工程前沿国际学术会议(FTTE 2025)
  • 完整教程:LeetCode算法日记 - Day 58: 目标和、数组总和
  • MATLAB中基于 S-V模型进行毫米波信道建模与仿真
  • 认知与困境
  • AT_joisc2021_c フードコート (Foodcourt)
  • L06_mybatis读取MySQL数据库(懵逼版)
  • 2025 高效过滤器制造企业最新推荐榜:供货商定制方案深度解析及口碑评级
  • 2025 年试验箱厂家 TOP 企业品牌推荐排行榜,氙灯老化 / 紫外老化 / 冷热冲击 / 恒温恒湿 / 高低温 / 快速温变 / 盐水喷雾 / 高温老化 / 砂尘 / 淋雨试验箱公司推荐!
  • 系统修复
  • 什么是vibe ?
  • 2025年10月试验箱厂家最新推荐排行榜:氙灯老化试验箱,紫外老化试验箱,冷热冲击试验箱,恒温恒湿试验箱公司推荐!
  • 经典视觉跟踪算法的MATLAB实现
  • adobe illustrator中鼠标拖动移动幅度大
  • 微算法科技(MLGO)发布隐私与能量感知联盟博弈算法,重塑边缘摄像头网络架构,推动物联网智能演进