猿人学第5题-

This commit is contained in:
aiguigu 2022-05-17 01:55:01 +08:00
parent d21ce88eef
commit 5a1ffb9d51

View File

@ -1,5 +1,9 @@
## 知识点 ## 知识点
hook cookie
Cookie之所以要新增一个包含固定字符串的判断是因为cookie经常被修改这样会断很多次而我们只想让他断在固定cookie块被设置的时候因此这么写
// 方案二 indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。 // 方案二 indexOf() 方法可返回某个指定的字符串值在字符串中首次出现的位置。
// ==UserScript== // ==UserScript==
@ -26,3 +30,27 @@
}) })
})(); })();
hook window
// ==UserScript==
// @name Hook Cookie
// @namespace http://tampermonkey.net/
// @version 0.1
// @description pass
// @author ayf
// @run-at document-start
// @match *://match.yuanrenxue.com/*
// @grant none
// ==/UserScript==
(function () {
'use strict';
Object.defineProperty(window, "_$ss", {
set:function(val){
console.log(11111)
console.warn("hook _$ss", val)
debugger;
return val;
}
})
})();