zoukankan      html  css  js  c++  java
  • fiddler 代理设置

    在static function OnBeforeRequest(oSession: Session)方法内添加以下代码:

    重定向:
    regex:(?inx).*fxtest.fxwork.kugou.com/sns/oauth2/access_token
    https://api.weixin.qq.com/sns/oauth2/access_token

    static function OnBeforeRequest(oSession: Session) {
            //屏蔽本机
            if (!String.IsNullOrEmpty(oSession["x-ProcessInfo"])) { 
                oSession["ui-hide"] = "localprocess"; 
            }
            //替换域名
            //if(oSession.HostnameIs("A.com")) {
            //    oSession.hostname="B.com";
            //}
            //重定向
            //if (oSession.fullUrl.contains("get_verify_info"))
            //{
            //    oSession.hostname="10.17.6.90:17020";
            //}
            // Sample Rule: Color ASPX requests in RED
            // if (oSession.uriContains(".aspx")) {    oSession["ui-color"] = "red";    }
    
            // Sample Rule: Flag POSTs to fiddler2.com in italics
            // if (oSession.HostnameIs("www.fiddler2.com") && oSession.HTTPMethodIs("POST")) {    oSession["ui-italic"] = "yup";    }
    
            // Sample Rule: Break requests for URLs containing "/sandbox/"
            // if (oSession.uriContains("/sandbox/")) {
            //     oSession.oFlags["x-breakrequest"] = "yup";    // Existence of the x-breakrequest flag creates a breakpoint; the "yup" value is unimportant.
            // }
            //修改头部
            if(oSession.fullUrl.contains("doFollow")){//根据host判断
                oSession.RequestHeaders.Add("type","VERIFT");
                oSession.RequestHeaders.Add("data","...");
            }
    }
        static function OnBeforeResponse(oSession: Session) {
            if (m_Hide304s && oSession.responseCode == 304) {
                oSession["ui-hide"] = "true";
            }
            
            if(oSession.fullUrl.contains("doFollow")){//根据host判断
                oSession.ResponseHeaders.Add("type","VERIFT");
                oSession.ResponseHeaders.Add("data","...");
            }
    
        }
  • 相关阅读:
    ListView的使用(二)长按弹出上下文菜单
    自己遇到程序安装完图标不显示记录
    ListView的使用(一)
    Docker 构建私有镜像仓库
    DockerFile 编译语法详解
    Docker 添加容器SSH服务
    Docker 数据卷与容器互联
    Docker 镜像与容器管理
    Docker 容器简介与部署
    Zabbix-自带监控项与Kye
  • 原文地址:https://www.cnblogs.com/zhaozilongcjiajia/p/12368015.html
Copyright © 2011-2022 走看看