diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 0b98d0aae..1d9521829 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -140,7 +140,7 @@ module.exports = {
]
},
{
- text: '框架接口', link: '/pages/re/', items: [
+ text: '框架接口', link: '/pages/selenium/', items: [
{
text: '自动化框架', items: [
{ text: 'selenium', link: '/pages/selenium/' },
@@ -169,7 +169,7 @@ module.exports = {
]
},
{
- text: '脚本命令', link: '/pages/re/', items: [
+ text: '脚本命令', link: '/pages/js-hook/', items: [
{
text: '辅助脚本', items: [
{ text: 'JS Hook', link: '/pages/js-hook/' },
@@ -200,6 +200,7 @@ module.exports = {
},
]
},
+ { text: '报错处理', link: '/pages/error-handling/' },
{ text: '赞助', link: '/pages/sponsor/' },
],
sidebarDepth: 2, // 侧边栏显示深度,默认1,最大2(显示到h3标题)
@@ -346,7 +347,7 @@ module.exports = {
],
markdown: {
- // lineNumbers: true,
+ lineNumbers: true,
extractHeaders: ['h2', 'h3', 'h4', 'h5', 'h6'], // 提取标题到侧边栏的级别,默认['h2', 'h3']
},
diff --git a/docs/.vuepress/public/img/geekbyte.jpg b/docs/.vuepress/public/img/geekbyte.jpg
new file mode 100644
index 000000000..446bc3267
Binary files /dev/null and b/docs/.vuepress/public/img/geekbyte.jpg differ
diff --git "a/docs/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225.md" "b/docs/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225.md"
index b4e6b96ca..b2c13f3b6 100644
--- "a/docs/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225.md"
+++ "b/docs/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225/01.\347\233\256\345\275\225.md"
@@ -3,6 +3,7 @@ title: 目录
date: 2020-05-12 14:57:21
permalink: /pages/toc
article: false
+sidebar: false
---
## 目录
diff --git "a/docs/05.\350\204\232\346\234\254\345\221\275\344\273\244/01.\350\276\205\345\212\251\350\204\232\346\234\254/01.JS HOOK.md" "b/docs/05.\350\204\232\346\234\254\345\221\275\344\273\244/01.\350\276\205\345\212\251\350\204\232\346\234\254/01.JS HOOK.md"
index 752d931f9..100bbf6d5 100644
--- "a/docs/05.\350\204\232\346\234\254\345\221\275\344\273\244/01.\350\276\205\345\212\251\350\204\232\346\234\254/01.JS HOOK.md"
+++ "b/docs/05.\350\204\232\346\234\254\345\221\275\344\273\244/01.\350\276\205\345\212\251\350\204\232\346\234\254/01.JS HOOK.md"
@@ -4,3 +4,352 @@ date: 2020-05-14 11:39:45
permalink: /pages/js-hook
article: false
---
+
+## Hook Cookie
+
+::: danger 注意
+不推荐方法二,部分特性可能正准备或者已经从相关的 web 标准中移除,参考文档:[MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__)
+:::
+
+
+
+ ```javascript
+ (function () {
+ var cookieCache = "";
+ Object.defineProperty(document, "cookie", {
+ set: function (val) {
+ console.log("Hook set cookie => ", val);
+ if (val.indexOf("spiderapi.cn") !== -1) {
+ debugger;
+ }
+ cookieCache = val;
+ return val;
+ },
+ get: function () {
+ return cookieCache;
+ }
+ });
+ })();
+ ```
+
+
+
+ ```javascript
+ (function () {
+ var cookieCache = document.cookie.__lookupSetter__("cookie");
+ document.__defineSetter__("cookie", function (val) {
+ console.log("Hook set cookie => ", val);
+ if (val.indexOf("spiderapi.cn") !== -1) {
+ debugger;
+ }
+ cookieCache = val;
+ });
+ document.__defineGetter__("cookie", function () {
+ return cookieCache;
+ });
+ })();
+ ```
+
+
+
+## Hook Request Header
+
+```javascript
+(function () {
+ var headerCache = window.XMLHttpRequest.prototype.setRequestHeader;
+ window.XMLHttpRequest.prototype.setRequestHeader = function (key, value) {
+ console.log("Hook set header %s => %s", key, value);
+ if (key === "spiderapi.cn") {
+ debugger;
+ }
+ return headerCache.apply(this, arguments);
+ };
+})();
+```
+
+## Hook Debugger
+
+
+
+ ```javascript
+ (function () {
+ var constructorCache = Function.prototype.constructor;
+ Function.prototype.constructor = function (string) {
+ if (string === "debugger") {
+ console.log("Hook constructor debugger!")
+ return function () {};
+ }
+ return constructorCache(string);
+ };
+ })();
+ ```
+
+
+
+ ```javascript
+ (function () {
+ var setIntervalCache = setInterval
+ setInterval = function (func, delay) {
+ if (func.toString().indexOf("debugger") !== -1) {
+ console.log("Hook setInterval debugger!")
+ return function () {};
+ }
+ return setIntervalCache(func, delay)
+ };
+ })();
+ ```
+
+
+
+ ```javascript
+ (function () {
+ var setTimeoutCache = setTimeout;
+ setTimeout = function (func, delay) {
+ if (func.toString().indexOf("debugger") !== -1) {
+ console.log("Hook setTimeout debugger!")
+ return function () {};
+ }
+ return setTimeoutCache(func, delay);
+ };
+ })();
+ ```
+
+
+
+ ```javascript
+ (function () {
+ var evalCache = window.eval;
+ window.eval = function (string) {
+ if(string.includes("debugger")){
+ console.log("Hook eval debugger!")
+ }
+ return evalCache(string.replace(/debugger\s*;?/g, ""));
+ };
+ window.eval.toString = function () {
+ return evalCache.toString();
+ };
+ })();
+ ```
+
+
+
+## Hook XHR
+
+```javascript
+(function () {
+ var openCache = window.XMLHttpRequest.prototype.open;
+ window.XMLHttpRequest.prototype.open = function(method, url) {
+ console.log("Hook xhr method => %s, url => %s", method, url);
+ if (url.indexOf("spiderapi.cn") !== -1) {
+ debugger;
+ }
+ return openCache.apply(this, arguments);
+ };
+})();
+```
+
+## Hook fetch
+
+```javascript
+(function() {
+ var fetchCache = Object.getOwnPropertyDescriptor(window, "fetch")
+ Object.defineProperty(window, "fetch", {
+ value: function (url) {
+ console.log("Hook fetch url => ", url)
+ debugger;
+ return fetchCache.value.apply(this, arguments)
+ }
+ })
+})();
+```
+
+## Hook JSON.stringify
+
+```javascript
+(function() {
+ var stringifyCache = JSON.stringify;
+ JSON.stringify = function(params) {
+ console.log("Hook JSON.stringify => ", params);
+ debugger;
+ return stringifyCache(params);
+ }
+})();
+```
+
+## Hook JSON.parse
+
+```javascript
+(function() {
+ var parseCache = JSON.parse;
+ JSON.parse = function(params) {
+ console.log("Hook JSON.parse => ", params);
+ debugger;
+ return parseCache(params);
+ }
+})();
+```
+
+## Hook Function
+
+以下代码执行后,所有的函数操作都会在控制台打印输出将要执行的 JS 源码。
+
+```javascript
+(function() {
+ let FunctionCache = window.Function;
+ let newFunction = function() {
+ let src = arguments[arguments.length - 1];
+ console.log("Hook Function => ", src);
+ debugger;
+ return FunctionCache.apply(this, arguments);
+ };
+ newFunction.toString = function() {
+ return FunctionCache.toString();
+ };
+})();
+```
+
+## Hook WebSocket
+
+```javascript
+(function() {
+ let sendCache = WebSocket.prototype.send;
+ WebSocket.prototype.send = function (data){
+ console.info("Hook WebSocket send => ", data);
+ return sendCache(data)
+ };
+})();
+```
+
+## Hook eval
+
+```javascript
+(function () {
+ var evalCache = window.eval;
+ window.eval = function (string) {
+ console.log("Hook eval =>", string);
+ debugger;
+ return evalCache(string);
+ };
+ window.eval.toString = function () {
+ return evalCache.toString();
+ };
+})();
+```
+
+## Hook setInterval
+
+```javascript
+(function () {
+ var setIntervalCache = setInterval;
+ setInterval = function (func, delay) {
+ console.log("Hook setInterval func => %s, delay => %s", func, delay);
+ debugger;
+ return setIntervalCache(func, delay);
+ };
+})();
+```
+
+## Hook setTimeout
+
+```javascript
+(function () {
+ var setTimeoutCache = setTimeout;
+ setTimeout = function (func, delay) {
+ console.log("Hook setTimeout func => %s, delay => %s", func, delay);
+ debugger;
+ return setTimeoutCache(func, delay);
+ };
+})();
+```
+
+## Hook RegExp
+
+```javascript
+(function () {
+ let RegExpCache = RegExp;
+ RegExp = function(pattern, flags) {
+ console.log("Hook RegExp pattern => %s, flags => %s", pattern, flags);
+ debugger;
+ return RegExpCache(pattern, flags);
+ };
+})();
+```
+
+## Hook Canvas
+
+```javascript
+(function() {
+ let createElementCache = document.createElement;
+ document.createElement = function(tagName) {
+ console.info("Hook createElement tagName => ", tagName);
+ if(tagName === "canvas") {
+ debugger;
+ }
+ return createElementCache(tagName);
+ };
+})();
+```
+
+## Hook createElement
+
+```javascript
+(function() {
+ var createElementCache = document.createElement;
+ document.createElement = function(tagName) {
+ console.info("Hook createElement tagName => ", tagName);
+ if(tagName === "div") {
+ debugger;
+ }
+ return createElementCache(tagName);
+ };
+})();
+```
+
+## Hook getElementById
+
+```javascript
+(function() {
+ var getElementByIdCache = document.getElementById;
+ document.getElementById = function(id) {
+ console.info("Hook getElementById id => ", id);
+ if(id === "spiderapi") {
+ debugger;
+ }
+ return getElementByIdCache(id);
+ };
+})();
+```
+
+## Hook setAttribute
+
+```javascript
+(function() {
+ var setAttributeCache = window.Element.prototype.setAttribute;
+ window.Element.prototype.setAttribute = function(name, value) {
+ console.info("Hook setAttribute name => %s, value => %s", name, value);
+ if(name === "spiderapi") {
+ debugger;
+ }
+ return setAttributeCache(name, value);
+ };
+})();
+```
+
+## 清除定时器
+
+```javascript
+for (let i = 1; i < 99999; i++) window.clearInterval(i);
+```
+
+
+## Hook 通用模板
+
+```javascript
+(function () {
+ var oldFunc = func;
+ func = function(arguments){
+ console.log(arguments)
+ return oldFunc.apply(arguments)
+ };
+})();
+```
\ No newline at end of file
diff --git "a/docs/06.\346\212\245\351\224\231\345\244\204\347\220\206/01.\346\212\245\351\224\231\345\244\204\347\220\206/01.\346\212\245\351\224\231\345\244\204\347\220\206.md" "b/docs/06.\346\212\245\351\224\231\345\244\204\347\220\206/01.\346\212\245\351\224\231\345\244\204\347\220\206/01.\346\212\245\351\224\231\345\244\204\347\220\206.md"
new file mode 100644
index 000000000..2629b301b
--- /dev/null
+++ "b/docs/06.\346\212\245\351\224\231\345\244\204\347\220\206/01.\346\212\245\351\224\231\345\244\204\347\220\206/01.\346\212\245\351\224\231\345\244\204\347\220\206.md"
@@ -0,0 +1,7 @@
+---
+title: '报错处理'
+date: 2020-05-12 15:09:57
+permalink: /pages/error-handling
+article: false
+---
+
diff --git "a/docs/06.\350\265\236\345\212\251/01.\350\265\236\345\212\251.md" "b/docs/06.\350\265\236\345\212\251/01.\350\265\236\345\212\251.md"
deleted file mode 100644
index a0ad5b76f..000000000
--- "a/docs/06.\350\265\236\345\212\251/01.\350\265\236\345\212\251.md"
+++ /dev/null
@@ -1,58 +0,0 @@
----
-title: '支持我们'
-date: 2020-05-12 15:09:57
-permalink: /pages/sponsor
-sidebar: false
-article: false
----
-
-::: cardList 3
-```yaml
-- name: Spider Box
- desc: 🚀 SpiderBox - 虫盒 - 爬虫逆向资源导航站
- link: https://spiderbox.cn/
- bgColor: '#f1f1f1'
- textColor: '#2A3344'
-- name: Spider Api
- desc: 🚀 SpiderApi - 爬虫逆向常用 API
- link: https://spiderapi.cn/
- bgColor: '#F0DFB1'
- textColor: '#2A3344'
-- name: Spider Law
- desc: 🚀 SpiderLaw - 爬虫相关法律法规建设
- # link: https://github.com/xugaoyi/vuepress-theme-vdoing
- bgColor: '#DFEEE7'
- textColor: '#2A3344'
-```
-:::
-
-
-
-如果您正在使用这个项目并感觉良好,或者是想支持我继续开发,您可以通过如下`任意`方式支持我:
-
-1. Star 并分享 [SpiderApi](https://github.com/TRHX/SpiderApi) 丨[SpiderBox](https://github.com/TRHX/SpiderBox)丨[SpiderLaw](https://github.com/TRHX/SpiderLaw)
-2. 轻轻点击一次本站的广告。 :D
-2. 进入下面赞助商花十几秒钟扫码注册一下, 赞助商就会代您赞助一笔小钱。 :D
-3. 通过以下二维码,一次性打赏,所有打赏将用于本项目的支出。 :tea:
-
-谢谢! :heart:
-
-| 微信赞赏 | 微信支付 | 支付宝 |
-| :---: | :---: | :---: |
-| | | |
-
-
-::: center
-## 赞助商
-:::
-
-
-
-::: center
-## 赞助 / 支出记录
-:::
-
-| 日期 | 渠道 | 金额 | 昵称 | 备注 |
-| :---: | :---: | :---: | :---: | :---: |
-| 2023.08.13 | | -¥35 | | spiderapi 域名注册 |
-| 总计 | | -¥35 | | |
diff --git "a/docs/07.\350\265\236\345\212\251/01.\350\265\236\345\212\251.md" "b/docs/07.\350\265\236\345\212\251/01.\350\265\236\345\212\251.md"
new file mode 100644
index 000000000..d90ed4dbf
--- /dev/null
+++ "b/docs/07.\350\265\236\345\212\251/01.\350\265\236\345\212\251.md"
@@ -0,0 +1,60 @@
+---
+title: '支持我们'
+date: 2020-05-12 15:09:57
+permalink: /pages/sponsor
+sidebar: false
+article: false
+---
+
+::: cardList 3
+```yaml
+- name: Spider Box
+ desc: 🚀 SpiderBox - 虫盒 - 爬虫逆向资源导航站
+ link: https://spiderbox.cn/
+ bgColor: '#f1f1f1'
+ textColor: '#2A3344'
+- name: Spider Api
+ desc: 🚀 SpiderApi - 爬虫逆向常用 API
+ link: https://spiderapi.cn/
+ bgColor: '#F0DFB1'
+ textColor: '#2A3344'
+- name: Spider Law (待定)
+ desc: 🚀 SpiderLaw - 数据采集相关法律法规建设
+ bgColor: '#DFEEE7'
+ textColor: '#2A3344'
+```
+:::
+
+
+
+Spider 系列项目由 [BOB](https://www.itbob.cn/) 在业余时间建立和完善,基于互联网之分享精神,为非营利性网站,如果您觉得 Spider 系列项目对您有所帮助,或者是想支持我继续开发,您可以通过如下任意方式支持我:
+
+1. GitHub 点亮 Star 并分享 [SpiderApi](https://github.com/TRHX/SpiderApi) 丨[SpiderBox](https://github.com/TRHX/SpiderBox)丨[SpiderLaw](https://github.com/TRHX/SpiderLaw)。:star:
+
+2. 通过以下二维码,一次性打赏,所有打赏将用于本项目的支出。:moneybag:
+
+3. 成为赞助商,可获得 Spider 系列所有广告位,优质爬虫/逆向社群和站长公众号推广。:tada:
+
+| 微信赞赏 | 微信支付 | 支付宝 |
+| :---: | :---: | :---: |
+| | | |
+
+::: tip Tips
+所有打赏、赞助将用于 Spider 系列项目域名、服务器、COS 等项目的续费,谢谢! :heart:
+:::
+
+::: center
+### 赞助商
+:::
+
+
+
+::: center
+### 赞助 / 支出记录
+:::
+
+| 日期 | 渠道 | 金额 (¥) | 昵称 | 备注 |
+| :---: | :---: | :---: | :---: | :---: |
+| 2023.08.13 | 阿里云 | -35 | | spiderapi.cn 域名注册 |
+| 2023.08.12 | 阿里云 | -35 | | spiderbox.cn 域名注册 |
+| **总计** | | **-70** | | |
diff --git a/docs/index.md b/docs/index.md
index 673bd3e26..6f9152680 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -39,26 +39,25 @@ postList: none
::: cardList 3
```yaml
-# - name: OpenHarmony
-# desc: 开放原子开源基金会
-# link: https://docs.openharmony.cn/pages/000000/
-# bgColor: '#f1f1f1'
-# textColor: '#2A3344'
-- name: Spider Box
- desc: 🚀 SpiderBox - 虫盒 - 爬虫逆向资源导航站
- link: https://spiderbox.cn/
- bgColor: '#f1f1f1'
- textColor: '#2A3344'
-- name: Spider Api
- desc: 🚀 SpiderApi - 爬虫逆向常用 API
- link: https://spiderapi.cn/
- bgColor: '#F0DFB1'
- textColor: '#2A3344'
-- name: Spider Law
- desc: 🚀 SpiderLaw - 爬虫相关法律法规建设
- # link: https://github.com/xugaoyi/vuepress-theme-vdoing
- bgColor: '#DFEEE7'
- textColor: '#2A3344'
+config:
+ target: _blank # _self
+
+data:
+ - name: Spider Box
+ desc: 🚀 SpiderBox - 虫盒 - 爬虫逆向资源导航站
+ link: https://spiderbox.cn/
+ bgColor: '#f1f1f1'
+ textColor: '#2A3344'
+ - name: Spider Api
+ desc: 🚀 SpiderApi - 爬虫逆向常用 API
+ link: https://spiderapi.cn/
+ bgColor: '#F0DFB1'
+ textColor: '#2A3344'
+ - name: Spider Law (待定)
+ desc: 🚀 SpiderLaw - 数据采集相关法律法规建设
+ link: /
+ bgColor: '#DFEEE7'
+ textColor: '#2A3344'
```
:::
@@ -83,24 +82,17 @@ Spider API 项目由 BOB 在
desc: 中科大数据研究院高级工程师
avatar: /img/lx.jpg
link: https://blog.csdn.net/weixin_43582101
- bgColor: '#CBEAFA' # 可选,默认var(--bodyBg)。颜色值有#号时请添加单引号
- textColor: '#6854A1' # 可选,默认var(--textColor)
-# - name: XAOXUU
-# desc: '#IOS #Volantis主题作者'
-# avatar: https://fastly.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png
-# link: https://xaoxuu.com
-# bgColor: '#718971'
-# textColor: '#fff'
-# - name: 平凡的你我
-# desc: 理想成为大牛的小陈同学
-# avatar: https://reinness.com/avatar.png
-# link: https://reinness.com
-# bgColor: '#FCDBA0'
-# textColor: '#A05F2C'
+ bgColor: '#FCDBA0' # 可选,默认var(--bodyBg)。颜色值有#号时请添加单引号
+ textColor: '#A05F2C' # 可选,默认var(--textColor)
+- name: geekbyte
+ desc: 移动安全、tls/ja3指纹,公众号编角料
+ avatar: /img/geekbyte.jpg
+ link: https://blog.csdn.net/Y_morph
+ bgColor: '#CBEAFA'
+ textColor: '#6854A1'
```
:::
-
-
+
+
+