当前位置:   article > 正文

Fiddler捕捉数据包得到几乎全是加密过的tunnel to【解决方法】_fiddler抓到的数据是加密的

fiddler抓到的数据是加密的
                       

困扰了我很久的这个问题被解决了

这个东西一直都没有办法解决,让我们在后面想要做到爬取手机应用上的数据根本就做不到。

因为,根据网络上设置的很多方法,改变了ip代理之后,我就发现我的手机上不了网络了。都上不了网络了,我还怎么抓到对应的包呢?所以,在这陷入了深思。
手机上不了网!设置完代理之后手机上不了网!得到的所有包的信息显示的都是加密的(tunnel to)

这里写图片描述
这样类似的字样,已经把我搞得头都炸了!


解决方案

修改FiddlerScript
也就是改写Fiddler代理脚本。
这里写图片描述

然后找到 OnBeforeRequest这个函数,用下面的函数来替换原来的函数
目的就是为了欺骗对方的服务器。
修改之后,记得要保存!!!!!
点击左上角的 Save Script 这个按钮
之后,我们就可以发现,手机就变得可以上网了!!!
而且看到对应的包都是没有被加密的! 我仿佛又看到一堆的数据在向我招手!!!

static function OnBeforeRequest(oSession: Session) {        // 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 ((null != gs_ReplaceToken) && (oSession.url.indexOf(gs_ReplaceToken)>-1)) {   // Case sensitive            oSession.url = oSession.url.Replace(gs_ReplaceToken, gs_ReplaceTokenWith);         }        if ((null != gs_OverridenHost) && (oSession.host.toLowerCase() == gs_OverridenHost)) {            oSession["x-overridehost"] = gs_OverrideHostWith;         }        if ((null!=bpRequestURI) && oSession.uriContains(bpRequestURI)) {            oSession["x-breakrequest"]="uri";        }        if ((null!=bpMethod) && (oSession.HTTPMethodIs(bpMethod))) {            oSession["x-breakrequest"]="method";        }        if ((null!=uiBoldURI) && oSession.uriContains(uiBoldURI)) {            oSession["ui-bold"]="QuickExec";        }        if (m_SimulateModem) {            // Delay sends by 300ms per KB uploaded.            oSession["request-trickle-delay"] = "300";             // Delay receives by 150ms per KB downloaded.            oSession["response-trickle-delay"] = "150";         }        if (m_DisableCaching) {            oSession.oRequest.headers.Remove("If-None-Match");            oSession.oRequest.headers.Remove("If-Modified-Since");            oSession.oRequest["Pragma"] = "no-cache";        }        // User-Agent Overrides        if (null != sUA) {            oSession.oRequest["User-Agent"] = sUA;         }        if (m_Japanese) {            oSession.oRequest["Accept-Language"] = "ja";        }        if (m_AutoAuth) {            // Automatically respond to any authentication challenges using the             // current Fiddler user's credentials. You can change (default)            // to a domain\\username:password string if preferred.            //            // WARNING: This setting poses a security risk if remote             // connections are permitted!            oSession["X-AutoAuth"] = "(default)";        }        if (m_AlwaysFresh && (oSession.oRequest.headers.Exists("If-Modified-Since") || oSession.oRequest.headers.Exists("If-None-Match")))        {            oSession.utilCreateResponseAndBypassServer();            oSession.responseCode = 304;            oSession["ui-backcolor"] = "Lavender";        }        var hosts = 'zkd.me develop.dog';        FiddlerApplication.Log.LogFormat("Logger session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);        if(hosts.indexOf(oSession.host) > -1){            FiddlerApplication.Log.LogFormat("Capture session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);            if(oSession.HTTPMethodIs('CONNECT')){                FiddlerApplication.Log.LogString('create fake tunnel response');                oSession['x-replywithtunnel'] = 'FakeTunnel';                return;            }            if (oSession.isHTTPS){                FiddlerApplication.Log.LogString('switch https to http request');                oSession.fullUrl = oSession.fullUrl.Replace("https://","http://");                oSession.port = 80;            }               FiddlerApplication.Log.LogFormat("Processed session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);        }        FiddlerApplication.Log.LogFormat("Logger session {0}, Url: {1}, isHttps: {2}, port: {3}", oSession.id, oSession.fullUrl, oSession.isHTTPS, oSession.port);    }
  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
               

    再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!希望你也加入到我们人工智能的队伍中来!http://www.captainbed.net

    这里写图片描述
    声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/271520
    推荐阅读
    相关标签
      

    闽ICP备14008679号