Discuz! Board

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 596|回复: 1

瑞数 cookie 加速

[复制链接]

19

主题

11

回帖

255

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
255
发表于 2024-5-11 09:30:05 | 显示全部楼层 |阅读模式
  1. // ==UserScript==
  2. // @name         加速瑞数Cookie生成
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.1
  5. // @description  try to take over the world!
  6. // @author       挖掘机小王子
  7. // @match        https://fpdk.yunnan.chinatax.gov.cn/*
  8. // @icon         https://www.google.com/s2/favicons?sz=64&domain=nmpa.gov.cn
  9. // @run-at       document-start
  10. // @grant        unsafeWindow
  11. // ==/UserScript==

  12. (function() {
  13.     'use strict';

  14.     // Your code here...
  15.     // Enable the passage of the 'this' object through the JavaScript timers
  16.     var __nativeST__ = unsafeWindow.setTimeout, __nativeSI__ = unsafeWindow.setInterval;

  17.     unsafeWindow.setTimeout = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {
  18.         console.log("function setTimeout() { [native code] }!", nDelay);
  19.         var oThis = this, aArgs = Array.prototype.slice.call(arguments, 2);
  20.         return __nativeST__(vCallback instanceof Function ? function () {
  21.             vCallback.apply(oThis, aArgs);
  22.         } : vCallback, nDelay/10);
  23.     };

  24.     unsafeWindow.setInterval = function (vCallback, nDelay /*, argumentToPass1, argumentToPass2, etc. */) {
  25.         console.log("function setInterval() { [native code] }!", nDelay);
  26.         var oThis = this, aArgs = Array.prototype.slice.call(arguments, 2);
  27.         return __nativeSI__(vCallback instanceof Function ? function () {
  28.             vCallback.apply(oThis, aArgs);
  29.         } : vCallback, nDelay/10);
  30.     };

  31. })();
复制代码


回复

使用道具 举报

19

主题

11

回帖

255

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
255
 楼主| 发表于 2024-5-11 09:32:27 | 显示全部楼层
注意:native code 是瑞数进行反 hook 的关键!!!因为瑞数存在 setInterval 检测!!!
  1. _$nD = Function;
  2. var _$Kp = _$nD['prototype']['toString'];
  3. _$pR = _$Fr = setInterval
  4. _$OR = _$Kp['apply'](_$pR);
  5. _$$P = new RegExp('{\\s*\\[native code\\]\\s*}')
  6. if (typeof _$pR !== "function" || !_$$P["test"](_$OR) || (_$Fr != undefined && _$pR !== _$Fr)){
  7.   console.log('hook 失败');
  8. _$RX = true;
  9. }else{
  10.   console.log('hook 成功');
  11. }
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|DiscuzX

GMT+8, 2024-10-7 01:28 , Processed in 0.031872 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表