static function OnBeforeResponse(oSession: Session) {
if (m_Hide304s && oSession.responseCode == 304) {
oSession["ui-hide"] = "true";
}
//加在方法末尾
if (oSession.HostnameIs("mp.weixin.qq.com") && oSession.uriContains("https://mp.weixin.qq.com/mp/getappmsgext")){
var filename = "d:\\fiddler-token.log";
var curDate = new Date();
var logContent = "[" + curDate.toLocaleString() + "] " + oSession.PathAndQuery + "\r\n"+oSession.GetResponseBodyAsString()+"\r\n";
var sw : System.IO.StreamWriter;
if (System.IO.File.Exists(filename)){
sw = System.IO.File.AppendText(filename);
sw.Write(logContent);
}
else{
sw = System.IO.File.CreateText(filename);
sw.Write(logContent);
}
sw.Close();
sw.Dispose();
//提交到服务端
var method:String = 'POST';
var url:String = 'http://192.168.1.112:88/admin/addread';
var protocol = "HTTP/1.1";
var raw = method + " " + url + " " + protocol + "\r\n";
raw += "Content-Type: application/x-www-form-urlencoded\r\n"
var body = 'dat=' + oSession.GetResponseBodyAsString() + "&signature=" + oSession.RequestHeaders['XXXX'];
raw += "content-length: " + body.toString().length + "\r\n";
raw += "\r\n" + body;
FiddlerObject.utilIssueRequest(raw);
}
}
获取微信公众号阅读数
最新推荐文章于 2024-09-10 17:48:39 发布