惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
Scott Helme
Scott Helme
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 最新话题
S
Security @ Cisco Blogs
Webroot Blog
Webroot Blog
S
Security Affairs
H
Hacker News: Front Page
TaoSecurity Blog
TaoSecurity Blog
W
WeLiveSecurity
G
GRAHAM CLULEY
T
Tenable Blog
Schneier on Security
Schneier on Security
S
Securelist
Cyberwarzone
Cyberwarzone
P
Privacy International News Feed
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Schneier on Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recent Commits to openclaw:main
Recent Commits to openclaw:main
O
OpenAI News
N
News and Events Feed by Topic
AWS News Blog
AWS News Blog
C
Cisco Blogs
T
Threat Research - Cisco Blogs
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
C
Check Point Blog
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
Martin Fowler
Martin Fowler
Microsoft Security Blog
Microsoft Security Blog
L
LangChain Blog
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
D
DataBreaches.Net
博客园_首页
MyScale Blog
MyScale Blog
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
P
Proofpoint News Feed
J
Java Code Geeks
SecWiki News
SecWiki News
P
Palo Alto Networks Blog
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org

博客园 - peak

windows 服务器时间同步失败处理方法 利用批处理自动创建schtasks系统任务 抓取网站编码信息及内容 jquery跨域调用WCF Base-64 字符串中的无效字符 Ie7下鼠标滚轮失效 Android 笔记二(取得根目录权限) Android 笔记一 捕获asp.net ValidationSummary 控件消息。 - peak Sql Split 函数 Rss的浏览器之痛 兼容IE,Firefox 图片即时显示 asp.net 中插入flash - peak - 博客园 迷茫 windows service 之访问权限 windows Service 之调试过程 比尔盖兹在某个大学毕业典礼上的演讲中,对毕业生提出十一项极为睿智的人生建议 MSDN上关于泛型的例子 泛型
在线调试利器Fiddler AutoResponse
peak · 2012-01-19 · via 博客园 - peak

      有些时候在测试环境和线上环境的不同,导致在线系统的js难易跟踪调试特别是一些动态js脚本。fiddler这个工具给我减少了很多调试上的烦恼,尤其是强大的AutoResponder.

它可以抓取在线页面保存到本地进行调试,这大大减少了在线调试的困难。

下面以http://www.fiddler2.com/fiddler2为例简单描述一下操作步骤:

1、打开fiddler2,在浏览器中输入http://www.fiddler2.com/fiddler2。在fiddler2可以看到请求记录。

2、选择需要调试的页面,右键-Save-Response-Response body

3、修改需要调试的代码段。

4、点击fiddler AutoResponder Tab页面,勾选Enable automatic responses,把http://www.fiddler2.com/fiddler2/这面拖拽到AutoResponder 列表中。

    默认 Rule Editor为精匹配。在第二个文本框中选择Find a file...,选择本地保存后的文件。

5、保存规则后,重新请求http://www.fiddler2.com/fiddler2/,在看Fiddler websessions 列表新的请求Result 301,说明请求的是本地缓存的文件。

这样就可以做我们想做的调试和修改了。

如果,你的请求是带动态参数的化,可以使用正则表达式。

如:请求规则:Regex:(?insx)^http://.*gravatar.*$

                   Regex:(?insx)^http://.*WF_ID=WFDevFx_GCUSTOMIZE&ticket=.*$

*下面是详细的过滤规则:

String Literals

Fiddler will match string literals (大小写不敏感)

Rule

Matches

*

http://www.example.com/Path1/query=example

EXAMPLE

http://www.example.com/Path1/query=example

path1/

http://www.example.com/Path1/query=example

query

http://www.example.com/Path1/q=Query

Exact Match(精确匹配)

Fiddler supports an exact, 大小写敏感 match syntax for expressions which begin with exact:

Rule

Matches

EXACT:http://www.example.com/path

http://www.example.com/path

EXACT:http://www.example.com/path

http://www.example.com/Path (No Match - mismatched case)

EXACT:http://www.example.com/path

http://www.example.com/path/q=Query (No Match - substring different)

Regular Expressions(正则表达式)

Fiddler supports regular expression syntax for expressions which begin with regex:

Rule

Matches

regex:.*

http://www.example.com/Path1/query=example

regex:.*\.jpg

http://www.example.com/Path1/query=foo.jpg&bar
http://www.example.com/Path1/query=example.jpg

regex:.*\.jpg$

http://www.example.com/Path1/query=foo.jpg&bar (No Match - improper ending)
http://www.example.com/Path1/query=example.jpg

regex:.*\.(jpg|gif|bmp)$

http://www.example.com/Path1/query=foo.bmp&bar (No Match  - improper ending)
http://www.example.com/Path1/query=example.gif
http://www.example.com/Path1/query=example.Gif  (No Match - mismatched case)
http://www.example.com/Path1/query=example.bmp

regex:(?insx).*\.(jpg|gif|bmp)$

http://www.example.com/Path1/query=foo.bmp&bar (No Match - improper ending)
http://www.example.com/Path1/query=example.gif
http://www.example.com/Path1/query=example.Gif 
http://www.example.com/Path1/query=example.bmp

 抓取带参数的请求并重定向:

  请求:http://v.sdo.com/login/game_login.htm?isgamelogin=true&server=1&abb=csws&returnUrl=%2fcsws%2fplay.htm

      重定向:http://www.cnblogs.com/peak-weng/archive/2012/01/19/2325855.html?isgamelogin=true&server=1&abb=csws&returnUrl=%2fcsws%2fplay.htm

     在Rule Editor:表示为:

      regex:(?insx)^http://v.sdo.com/login/game_login.htm\?(?<args>.*)$

      *redir: http://www.cnblogs.com/peak-weng/archive/2012/01/19/2325855.html?${args}

  如图:

     

参考文章:http://aiyooyoo.com/index.php/archives/250/