@filteringdev/tinyshield 3.5.2 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -9,10 +9,13 @@
|
|
|
9
9
|
*/
|
|
10
10
|
const Win = typeof unsafeWindow !== 'undefined' ? unsafeWindow : window;
|
|
11
11
|
import { CheckDepthInASWeakMap } from './as-weakmap.js';
|
|
12
|
+
import { SafeArrayToString } from './safe-ArrayToString.js';
|
|
12
13
|
export const OriginalRegExpTest = Win.RegExp.prototype.test;
|
|
13
14
|
export function RunTinyShieldUserscript(BrowserWindow, UserscriptName = 'tinyShield') {
|
|
14
|
-
const OriginalArrayToString = BrowserWindow.Array.prototype.toString;
|
|
15
15
|
const OriginalRegExpTest = BrowserWindow.RegExp.prototype.test;
|
|
16
|
+
const OriginalArrayMap = BrowserWindow.Array.prototype.map;
|
|
17
|
+
const OriginalString = BrowserWindow.String;
|
|
18
|
+
const OriginalArrayJoin = BrowserWindow.Array.prototype.join;
|
|
16
19
|
const ProtectedFunctionStrings = ['toString', 'get', 'set'];
|
|
17
20
|
BrowserWindow.Function.prototype.toString = new Proxy(BrowserWindow.Function.prototype.toString, {
|
|
18
21
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
@@ -35,7 +38,7 @@ export function RunTinyShieldUserscript(BrowserWindow, UserscriptName = 'tinyShi
|
|
|
35
38
|
if (Args.length > 0 && typeof Args[0] !== 'function') {
|
|
36
39
|
return Reflect.apply(Target, ThisArg, Args);
|
|
37
40
|
}
|
|
38
|
-
let ArgText =
|
|
41
|
+
let ArgText = SafeArrayToString(Args, { OriginalArrayMap, OriginalString, OriginalArrayJoin });
|
|
39
42
|
if (ASInitPositiveRegExps.filter(ASInitPositiveRegExp => ASInitPositiveRegExp.filter(Index => OriginalRegExpTest.call(Index, ArgText)).length >= 2).length === 1) {
|
|
40
43
|
console.debug(`[${UserscriptName}]: Map.prototype.get:`, ThisArg, Args);
|
|
41
44
|
throw new Error();
|
|
@@ -55,12 +58,7 @@ export function RunTinyShieldUserscript(BrowserWindow, UserscriptName = 'tinyShi
|
|
|
55
58
|
BrowserWindow.Map.prototype.set = new Proxy(BrowserWindow.Map.prototype.set, {
|
|
56
59
|
apply(Target, ThisArg, Args) {
|
|
57
60
|
let ArgText = '';
|
|
58
|
-
|
|
59
|
-
ArgText = OriginalArrayToString.call(Args);
|
|
60
|
-
}
|
|
61
|
-
catch {
|
|
62
|
-
console.warn(`[${UserscriptName}]: Map.prototype.set:`, ThisArg, Args);
|
|
63
|
-
}
|
|
61
|
+
ArgText = SafeArrayToString(Args, { OriginalArrayMap, OriginalString, OriginalArrayJoin });
|
|
64
62
|
if (ASReinsertedAdvInvenPositiveRegExps.filter(ASReinsertedAdvInvenPositiveRegExp => ASReinsertedAdvInvenPositiveRegExp.filter(Index => OriginalRegExpTest.call(Index, ArgText)).length >= 3).length === 1) {
|
|
65
63
|
console.debug(`[${UserscriptName}]: Map.prototype.set:`, ThisArg, Args);
|
|
66
64
|
throw new Error();
|
package/dist/tinyShield.user.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// @downloadURL https://cdn.jsdelivr.net/npm/@filteringdev/tinyshield@latest/dist/tinyShield.user.js
|
|
9
9
|
// @license MPL-2.0
|
|
10
10
|
//
|
|
11
|
-
// @version 3.
|
|
11
|
+
// @version 3.6.0
|
|
12
12
|
// @author PiQuark6046 and contributors
|
|
13
13
|
//
|
|
14
14
|
// @grant unsafeWindow
|
|
@@ -3142,6 +3142,8 @@
|
|
|
3142
3142
|
// @match *://*.celebritynetworth.com/*
|
|
3143
3143
|
// @match *://sugarspunrun.com/*
|
|
3144
3144
|
// @match *://*.sugarspunrun.com/*
|
|
3145
|
+
// @match *://tcdb.com/*
|
|
3146
|
+
// @match *://*.tcdb.com/*
|
|
3145
3147
|
// @match *://mtgdecks.net/*
|
|
3146
3148
|
// @match *://*.mtgdecks.net/*
|
|
3147
3149
|
// @match *://preppykitchen.com/*
|
|
@@ -4078,6 +4080,8 @@
|
|
|
4078
4080
|
// @match *://*.evolvingtable.com/*
|
|
4079
4081
|
// @match *://runtothefinish.com/*
|
|
4080
4082
|
// @match *://*.runtothefinish.com/*
|
|
4083
|
+
// @match *://unboundwellness.com/*
|
|
4084
|
+
// @match *://*.unboundwellness.com/*
|
|
4081
4085
|
// @match *://neighborfoodblog.com/*
|
|
4082
4086
|
// @match *://*.neighborfoodblog.com/*
|
|
4083
4087
|
// @match *://fortressofsolitude.co.za/*
|
|
@@ -4186,6 +4190,8 @@
|
|
|
4186
4190
|
// @match *://*.navylookout.com/*
|
|
4187
4191
|
// @match *://apetogentleman.com/*
|
|
4188
4192
|
// @match *://*.apetogentleman.com/*
|
|
4193
|
+
// @match *://ffxnow.com/*
|
|
4194
|
+
// @match *://*.ffxnow.com/*
|
|
4189
4195
|
// @match *://thecookiedoughdiaries.com/*
|
|
4190
4196
|
// @match *://*.thecookiedoughdiaries.com/*
|
|
4191
4197
|
// @match *://fashionbeans.com/*
|
|
@@ -4724,6 +4730,8 @@
|
|
|
4724
4730
|
// @match *://*.whiteonricecouple.com/*
|
|
4725
4731
|
// @match *://anoregoncottage.com/*
|
|
4726
4732
|
// @match *://*.anoregoncottage.com/*
|
|
4733
|
+
// @match *://foodstruct.com/*
|
|
4734
|
+
// @match *://*.foodstruct.com/*
|
|
4727
4735
|
// @match *://sweetsimplevegan.com/*
|
|
4728
4736
|
// @match *://*.sweetsimplevegan.com/*
|
|
4729
4737
|
// @match *://lynnswayoflife.com/*
|
|
@@ -4872,6 +4880,8 @@
|
|
|
4872
4880
|
// @match *://*.ketocookingchristian.com/*
|
|
4873
4881
|
// @match *://gardeninthekitchen.com/*
|
|
4874
4882
|
// @match *://*.gardeninthekitchen.com/*
|
|
4883
|
+
// @match *://alxnow.com/*
|
|
4884
|
+
// @match *://*.alxnow.com/*
|
|
4875
4885
|
// @match *://droidgamers.com/*
|
|
4876
4886
|
// @match *://*.droidgamers.com/*
|
|
4877
4887
|
// @match *://hanjancrochet.com/*
|
|
@@ -4908,6 +4918,8 @@
|
|
|
4908
4918
|
// @match *://*.suebeehomemaker.com/*
|
|
4909
4919
|
// @match *://attractionsmagazine.com/*
|
|
4910
4920
|
// @match *://*.attractionsmagazine.com/*
|
|
4921
|
+
// @match *://travelawaits.com/*
|
|
4922
|
+
// @match *://*.travelawaits.com/*
|
|
4911
4923
|
// @match *://wendypolisi.com/*
|
|
4912
4924
|
// @match *://*.wendypolisi.com/*
|
|
4913
4925
|
// @match *://onmykidsplate.com/*
|
|
@@ -10522,6 +10534,8 @@
|
|
|
10522
10534
|
// @match *://*.gundamcard.gg/*
|
|
10523
10535
|
// @match *://hermitcrabanswers.com/*
|
|
10524
10536
|
// @match *://*.hermitcrabanswers.com/*
|
|
10537
|
+
// @match *://holistichealthherbalist.com/*
|
|
10538
|
+
// @match *://*.holistichealthherbalist.com/*
|
|
10525
10539
|
// @match *://homeoomph.com/*
|
|
10526
10540
|
// @match *://*.homeoomph.com/*
|
|
10527
10541
|
// @match *://iteachtoo.com/*
|
|
@@ -12022,6 +12036,8 @@
|
|
|
12022
12036
|
// @match *://*.heraldm.com/*
|
|
12023
12037
|
// @match *://razzball.com/*
|
|
12024
12038
|
// @match *://*.razzball.com/*
|
|
12039
|
+
// @match *://geo.fr/*
|
|
12040
|
+
// @match *://*.geo.fr/*
|
|
12025
12041
|
// @match *://freeconvert.com/*
|
|
12026
12042
|
// @match *://*.freeconvert.com/*
|
|
12027
12043
|
// @match *://pcgamebenchmark.com/*
|
|
@@ -13132,6 +13148,8 @@
|
|
|
13132
13148
|
// @match *://*.yahoo.com/*
|
|
13133
13149
|
// @match *://quizlet.com/*
|
|
13134
13150
|
// @match *://*.quizlet.com/*
|
|
13151
|
+
// @match *://apnews.com/*
|
|
13152
|
+
// @match *://*.apnews.com/*
|
|
13135
13153
|
// @match *://neowin.net/*
|
|
13136
13154
|
// @match *://*.neowin.net/*
|
|
13137
13155
|
// @match *://cboard.net/*
|
|
@@ -13202,6 +13220,8 @@
|
|
|
13202
13220
|
// @match *://*.references.be/*
|
|
13203
13221
|
// @match *://roleplayer.me/*
|
|
13204
13222
|
// @match *://*.roleplayer.me/*
|
|
13223
|
+
// @match *://rotowire.com/*
|
|
13224
|
+
// @match *://*.rotowire.com/*
|
|
13205
13225
|
// @match *://statecollege.com/*
|
|
13206
13226
|
// @match *://*.statecollege.com/*
|
|
13207
13227
|
// @match *://szamoldki.hu/*
|
|
@@ -13653,7 +13673,7 @@
|
|
|
13653
13673
|
// ==/UserScript==
|
|
13654
13674
|
|
|
13655
13675
|
|
|
13656
|
-
(()=>{function
|
|
13676
|
+
(()=>{function g(t,o){let i=new Set(o);return new Set(t.filter(l=>i.has(l))).size}function z(t){if(typeof t[0]!="object"||g(["device","id","imp","regs","site","source"],Object.keys(t[0]))<5)return!1;let o=/^[0-9]+\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+\/[a-z0-9-\(\)]+\/[a-zA-Z0-9_]+_slot[0-9]+_+/;return!(typeof Object.keys(t[0]).find(r=>typeof t[0][r]=="object"&&Array.isArray(t[0][r])&&t[0][r].filter(l=>typeof l=="object"&&Object.keys(l).filter(u=>typeof u=="string"&&k.call(o,u))).length>=1)>"u")}function c(t,o){let i=o.OriginalArrayMap.call(t,r=>o.OriginalString(r));return o.OriginalArrayJoin.call(i)}var Z=typeof unsafeWindow<"u"?unsafeWindow:window,k=Z.RegExp.prototype.test;function w(t,o="tinyShield"){let i=t.RegExp.prototype.test,r=t.Array.prototype.map,l=t.String,u=t.Array.prototype.join,m=["toString","get","set"];t.Function.prototype.toString=new Proxy(t.Function.prototype.toString,{apply(a,n,e){return m.includes(n.name)?`function ${n.name}() { [native code] }`:Reflect.apply(a,n,e)}});let A=[[/[a-zA-Z0-9]+ *=> *{ *const *[a-zA-Z0-9]+ *= *[a-zA-Z0-9]+ *; *if/,/===? *[a-zA-Z0-9]+ *\[ *[a-zA-Z0-9]+\( *[0-9a-z]+ *\) *\] *\) *return *[a-zA-Z0-9]+ *\( *{ *('|")?inventoryId('|")? *:/,/{ *('|")?inventoryId('|")? *: *this *\[[a-zA-Z0-9]+ *\( *[0-9a-z]+ *\) *\] *, *\.\.\. *[a-zA-Z0-9]+ *\[ *[a-zA-Z0-9]+ *\( *[0-9a-z]+ * *\) *\] *} *\)/]];t.Map.prototype.get=new Proxy(t.Map.prototype.get,{apply(a,n,e){if(e.length>0&&typeof e[0]!="function")return Reflect.apply(a,n,e);let p=c(e,{OriginalArrayMap:r,OriginalString:l,OriginalArrayJoin:u});if(A.filter(y=>y.filter(f=>i.call(f,p)).length>=2).length===1)throw console.debug(`[${o}]: Map.prototype.get:`,n,e),new Error;return Reflect.apply(a,n,e)}});let S=[[/inventory_id,[a-zA-Z0-9-]+\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+/,/inventory_id,[a-zA-Z0-9-]+\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+/,/inventory_id,[a-zA-Z0-9-]+\/[a-zA-Z0-9]+\/[a-zA-Z0-9]+/],[/[a-z0-9A-Z]+\.setAttribute\( *('|")onload('|") *, *('|")! *async *function\( *\) *\{ *let */,/confirm\( *[A-Za-z0-9]+ *\) *\) *{ *const *[A-Za-z0-9]+ *= *new *[A-Za-z0-9]+\.URL\(('|")https:\/\/report\.error-report\.com\//,/\.forEach *\( *\( *[A-Za-z0-9]+ *=> *[A-Za-z0-9]+\.remove *\( *\) *\) *\) *\) *, *[0-9a-f]+ *\) *; *const *[A-Za-z0-9]+ *= *await *\( *await *fetch *\(/]];t.Map.prototype.set=new Proxy(t.Map.prototype.set,{apply(a,n,e){let p="";if(p=c(e,{OriginalArrayMap:r,OriginalString:l,OriginalArrayJoin:u}),S.filter(y=>y.filter(f=>i.call(f,p)).length>=3).length===1)throw console.debug(`[${o}]: Map.prototype.set:`,n,e),new Error;return Reflect.apply(a,n,e)}}),t.WeakMap.prototype.set=new Proxy(t.WeakMap.prototype.set,{apply(a,n,e){if(z(e))throw console.debug(`[${o}]: WeakMap.prototype.set:`,n,e),new Error;return Reflect.apply(a,n,e)}});let s=[[/async *\( *\) *=> *{ *const *[A-Za-z0-9]+ *= *[A-Za-z0-9]+ *; *await *[A-Za-z0-9]+ *\( *\)/,/; *await *[A-Za-z0-9]+ *\( *\) *, *[A-Za-z0-9]+ *\( *! *1 *, *new *Error *\( *[A-Za-z0-9]+ *\( *[0-9a-f]+ *\) *\) *\) *}/,/ *\) *\) *\) *}/]];t.setTimeout=new Proxy(t.setTimeout,{apply(a,n,e){if(s.filter(p=>p.filter(y=>y.test(e[0].toString())).length>=3).length===1){console.debug(`[${o}]: setTimeout:`,e);return}return Reflect.apply(a,n,e)}}),t.setInterval=new Proxy(t.setInterval,{apply(a,n,e){if(s.filter(p=>p.filter(y=>y.test(e[0].toString())).length>=3).length===1){console.debug(`[${o}]: setInterval:`,e);return}return Reflect.apply(a,n,e)}})}w(Z);})();
|
|
13657
13677
|
/*!
|
|
13658
13678
|
* @license MPL-2.0
|
|
13659
13679
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@filteringdev/tinyshield",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -27,9 +27,14 @@
|
|
|
27
27
|
"url": "git+https://github.com/FilteringDev/tinyShield.git"
|
|
28
28
|
},
|
|
29
29
|
"license": "MPL-2.0",
|
|
30
|
-
"packageManager": "npm@11.5.1+",
|
|
31
30
|
"workspaces": [
|
|
32
31
|
"userscript",
|
|
33
32
|
"builder"
|
|
34
|
-
]
|
|
33
|
+
],
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^8.56.0",
|
|
36
|
+
"@typescript-eslint/parser": "^8.56.0",
|
|
37
|
+
"eslint": "^9.39.2",
|
|
38
|
+
"typescript-eslint": "^8.56.0"
|
|
39
|
+
}
|
|
35
40
|
}
|