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

推荐订阅源

P
Proofpoint News Feed
WordPress大学
WordPress大学
Help Net Security
Help Net Security
Jina AI
Jina AI
Security Latest
Security Latest
Y
Y Combinator Blog
Project Zero
Project Zero
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
Know Your Adversary
Know Your Adversary
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
NISL@THU
NISL@THU
Cisco Talos Blog
Cisco Talos Blog
博客园 - 司徒正美
MyScale Blog
MyScale Blog
Cyberwarzone
Cyberwarzone
D
Docker
T
The Blog of Author Tim Ferriss
G
Google Developers Blog
C
CERT Recently Published Vulnerability Notes
B
Blog
L
LangChain Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
SecWiki News
SecWiki News
The Hacker News
The Hacker News
C
Check Point Blog
L
Lohrmann on Cybersecurity
V2EX - 技术
V2EX - 技术
S
Securelist
T
Threat Research - Cisco Blogs
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
云风的 BLOG
云风的 BLOG
Latest news
Latest news
人人都是产品经理
人人都是产品经理
L
LINUX DO - 最新话题
Application and Cybersecurity Blog
Application and Cybersecurity Blog
The Register - Security
The Register - Security
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
AWS News Blog
AWS News Blog
C
Cybersecurity and Infrastructure Security Agency CISA
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
小众软件
小众软件
T
Tailwind CSS Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
宝玉的分享
宝玉的分享
O
OpenAI News

博客园 - 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/