fiddlescript 操作
Fiddler Script 是用JScript.NET语言写的
http://docs.telerik.com/fiddler/KnowledgeBase/FiddlerScript/ModifyRequestOrResponse
http://www.cnblogs.com/syf/archive/2013/01/12/2857278.html
语法实例:
#增加请求头 oSession.oRequest["NewHeaderName"] = "New header value"; oSession.oRequest.headers.Add("NewHeaderName", "New header value"); #移除请求头 oSession.oRequest.headers.Remove("Cookie"); #删除响应头 oSession.oResponse.headers.Remove("Set-Cookie"); #移除所有cookie oSession.oRequest.headers.Remove("Cookie"); #增加cookie var sCookie = oSession.oRequest["Cookie"]; //FiddlerObject.alert(sCookie); sCookie += "; song=jksong"; oSession.oRequest["Cookie"] = sCookie; #打印cookie FiddlerObject.log("path->"+oSession.PathAndQuery); FiddlerObject.log("cookie->"+oSession.oRequest["Cookie"]); #工具类 FiddlerObject.log("jksong"); FiddlerObject.alert("jksong");
增加菜单
实现功能:选中时设置某个cookie
1、insert->rules menu option 出入一段模板代码
2、找到 OnBeforeRequest 函数增加
if(m_debugcookie){ var sCookie = oSession.oRequest["Cookie"]; FiddlerObject.log("[jksong] cookie debug be added"); sCookie += "; debug=1"; oSession.oRequest["Cookie"] = sCookie; }
3、效果
host管理插件willow