当前位置: 首页 > 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.hskmm.com/?act=detail&tid=32496

相关文章:

  • 计算机视觉在自动化质检中的应用
  • 动态加速中优化失败路径反馈的方法
  • 铜价冲击下,如何“锁住”母排利润?
  • 前端快速开发工具推荐与实战 让开发速度提升 3 倍的完整工具链
  • js代码、js文件混淆、加密
  • Salesforce推出AI版Setup,说句话就能搞定配置?
  • 10.16读书报告
  • 火山引擎Data Agent再拓新场景,重磅推出用户研究Agent
  • 元推理:哥德尔搞不完定理,翻来覆去的搞。。。。
  • Matlab选择常见颜色
  • HyperWorks许可状态监控
  • 2025年纺丝机实力源头靠谱优质口碑厂家推荐,知名品牌纺丝机生产商哪家好?
  • 2025 年防静电地板源头厂家最新推荐榜单:权威品牌实力展现,助力各行业精准挑选优质产品
  • PostgreSQL社区CUUG 院校行 - 内蒙古农业大学计算机与信息工程学院
  • 2025 年激光焊锡源头厂家最新推荐排行榜:覆盖多行业需求,助力企业精准挑选优质设备供应商
  • 2025年西安买房攻略Top10:揭秘高性价比学区房与第四代住宅新趋势
  • 2025年西安购房热点:学区房与地铁盘终极指南
  • 2025年铝复合板厂家Top10排名:一站式服务引领行业新潮流
  • 2025年铝复合板厂家十大排名榜单:行业权威推荐与选择指南
  • 2025年铝复合板厂家综合实力排行榜TOP10:一站式服务成行业新趋势
  • 2025年市面上桥架品牌Top10权威推荐榜:专业选购指南
  • 2025年市面上桥架品牌排行榜前十强权威解析
  • 2025年桥架品牌综合实力排行榜:十大优质供应商权威评测
  • 客户案例 | 未来生物甄知科技,在SAP架构中搭建IT运维智能引擎
  • keycloak~标准的国际化设计
  • 微擎:让每个创意都能开花的小程序生态引擎
  • 哥德尔不完备定理中的完备是什么?是还原论证的具足幻想。不还原就是完备,哥德尔搞不完定理
  • 2025 年最新软瓷生产厂家推荐榜单:聚焦前沿技术与优质服务,助力精准筛选可靠软瓷材料供应商软瓷墙砖/软墙砖/外墙软瓷砖/外墙软瓷片厂家推荐
  • 百度地图打开地图不显示具体内容
  • fac卡片网格灵活控制宽高