fiddler web debugger (v4.6.2.0)
--------------------------------------抓取帶參數的請求并重定向-----------------------
1.重定向曆史文章清單頁
regex:(?insx)^https://mp.weixin.qq.com/mp/getmasssendmsg\?(?<args>.*)$
*redir:http://localhost/mp/getmasssendmsg?${args}
2.重定向具體文章頁
regex:(?insx)^https://mp.weixin.qq.com/s\?(?<args>.*)$
*redir:http://localhost/s?${args}
兩個文本框,先說第一個:
mathes:
字首為“exact:”表示完全比對(大小寫敏感)
無字首表示基本搜尋,表示搜尋到字元串就比對
字首為“regex:”表示使用正規表達式比對
字首為“regex:(?insx)”表示比對方式其中:
i表示不區分大小寫;
n表示指定的唯一有效的捕獲是顯式命名或編号的形式;
s表示單行模式;
x表示空格說明的;
詳細的說明見msdn
字首為“not:”表示發現就不比對
action:
filename 傳回檔案内容作為消息響應
http://targeturl 傳回此url的内容作為消息響應
*redir:http://targeturl 傳回一個跳轉url,注意,不是一般的url,一定要確定此url知道要到哪裡去,以便攜帶上相關的cookie資訊。
*bpu 設定一個斷點在發往伺服器以前停住此請求non-final action.
*bpafter 設定一個斷點在接收響應之前停住此請求non-final action.
*delay:#### 設定在發給伺服器之前的延時,以毫秒為機關。non-final action.
*header:name=value 設定請求頭的内容,如果沒有那個請求頭,則建立一個請求頭name并設定為valuenon-final action.
*flag:name=value 設定session flag的内容,如果沒有那個session flag,則建立一個session flagname并設定為valuenon-final action.
*corspreflightallow 傳回一個響應标志 cors 是否被允許。.
*reset 使用一個tcp/ip rst 重新設定用戶端的連結。
*drop 馬上關閉用戶端連結。
*exit 這時候停止處理比對。
也可以直接指定本地路徑或是url
http://targeturl
c:\filename
---------------------------fiddler session界面顯示ip位址列---------------
customrules.js中的main函數中加上 fiddlerobject.ui.lvsessions.addboundcolumn("server ip", 120, "x-hostip"); 這句代碼
static function main() {
var today: date = new date();
fiddlerobject.statustext = " customrules.js was loaded at: " + today;
//就是下面這句
fiddlerobject.ui.lvsessions.addboundcolumn("server ip", 120, "x-hostip");
}