C语言 c++ php mysql nginx linux lnmp lamp lanmp memcache redis 面试 笔记 ppt 设计模式 问题 远程连接

fiddlescript 操作

 

什么是 JScript .NET

 

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 

 

posted on 2017-01-14 14:25  思齐_  阅读(662)  评论(0编辑  收藏  举报