This commit is contained in:
cilame 2021-10-05 20:57:08 +08:00
parent bc4d5ee6f1
commit 4c7bbb8a96
2 changed files with 37 additions and 23 deletions

View File

@ -188,6 +188,8 @@ function injectfunc(e, window) {
var v_encodeURIComponent = encodeURIComponent
var v_escape = escape
var v_unescape = unescape
var v_atob = atob
var v_btoa = btoa
var util = (typeof require!=='undefined')?require('util'):{
inspect:function(e){
var r;
@ -207,15 +209,19 @@ function injectfunc(e, window) {
window.v_log(' (*)', a, util.inspect(b), '===>', c)
return c
}
if (e["config-hook-JSON.parse"]){ JSON.parse = saf(function parse(){ return e["config-hook-JSON.parse"]?v_logs('[JSON.parse]:', arguments, v_parse.apply(this, arguments)):v_parse.apply(this, arguments) }) }
if (e["config-hook-JSON.stringify"]){ JSON.stringify = saf(function stringify(){ return e["config-hook-JSON.stringify"]?v_logs('[JSON.stringify]:', arguments, v_stringify.apply(this, arguments)):v_stringify.apply(this, arguments) }) }
if (e["config-hook-decodeURI"]){ decodeURI = saf(function decodeURI(){ return e["config-hook-decodeURI"]?v_logs('[decodeURI]:', arguments, v_decodeURI.apply(this, arguments)):v_decodeURI.apply(this, arguments) }) }
if (e["config-hook-decodeURIComponent"]){ decodeURIComponent = saf(function decodeURIComponent(){ return e["config-hook-decodeURIComponent"]?v_logs('[decodeURIComponent]:', arguments, v_decodeURIComponent.apply(this, arguments)):v_decodeURIComponent.apply(this, arguments) }) }
if (e["config-hook-encodeURI"]){ encodeURI = saf(function encodeURI(){ return e["config-hook-encodeURI"]?v_logs('[encodeURI]:', arguments, v_encodeURI.apply(this, arguments)):v_encodeURI.apply(this, arguments) }) }
if (e["config-hook-encodeURIComponent"]){ encodeURIComponent = saf(function encodeURIComponent(){ return e["config-hook-encodeURIComponent"]?v_logs('[encodeURIComponent]:', arguments, v_encodeURIComponent.apply(this, arguments)):v_encodeURIComponent.apply(this, arguments) }) }
if (e["config-hook-escape"]){ escape = saf(function escape(){ return e["config-hook-escape"]?v_logs('[escape]:', arguments, v_escape.apply(this, arguments)):v_escape.apply(this, arguments) }) }
if (e["config-hook-unescape"]){ unescape = saf(function unescape(){ return e["config-hook-unescape"]?v_logs('[unescape]:', arguments, v_unescape.apply(this, arguments)):v_unescape.apply(this, arguments) }) }
if (e["config-hook-encrypt-normal"]){
if (e["config-hook-JSON.parse"]){ JSON.parse = saf(function parse(){ return e["config-hook-JSON.parse"]?v_logs('[JSON.parse]:', arguments, v_parse.apply(this, arguments)):v_parse.apply(this, arguments) }) }
if (e["config-hook-JSON.stringify"]){ JSON.stringify = saf(function stringify(){ return e["config-hook-JSON.stringify"]?v_logs('[JSON.stringify]:', arguments, v_stringify.apply(this, arguments)):v_stringify.apply(this, arguments) }) }
if (e["config-hook-decodeURI"]){ decodeURI = saf(function decodeURI(){ return e["config-hook-decodeURI"]?v_logs('[decodeURI]:', arguments, v_decodeURI.apply(this, arguments)):v_decodeURI.apply(this, arguments) }) }
if (e["config-hook-decodeURIComponent"]){ decodeURIComponent = saf(function decodeURIComponent(){ return e["config-hook-decodeURIComponent"]?v_logs('[decodeURIComponent]:', arguments, v_decodeURIComponent.apply(this, arguments)):v_decodeURIComponent.apply(this, arguments) }) }
if (e["config-hook-encodeURI"]){ encodeURI = saf(function encodeURI(){ return e["config-hook-encodeURI"]?v_logs('[encodeURI]:', arguments, v_encodeURI.apply(this, arguments)):v_encodeURI.apply(this, arguments) }) }
if (e["config-hook-encodeURIComponent"]){ encodeURIComponent = saf(function encodeURIComponent(){ return e["config-hook-encodeURIComponent"]?v_logs('[encodeURIComponent]:', arguments, v_encodeURIComponent.apply(this, arguments)):v_encodeURIComponent.apply(this, arguments) }) }
if (e["config-hook-escape"]){ escape = saf(function escape(){ return e["config-hook-escape"]?v_logs('[escape]:', arguments, v_escape.apply(this, arguments)):v_escape.apply(this, arguments) }) }
if (e["config-hook-unescape"]){ unescape = saf(function unescape(){ return e["config-hook-unescape"]?v_logs('[unescape]:', arguments, v_unescape.apply(this, arguments)):v_unescape.apply(this, arguments) }) }
if (e["config-hook-atob"]){ atob = saf(function atob(){ return e["config-hook-atob"]?v_logs('[atob]:', arguments, v_atob.apply(this, arguments)):v_atob.apply(this, arguments) }) }
if (e["config-hook-btoa"]){ btoa = saf(function btoa(){ return e["config-hook-btoa"]?v_logs('[btoa]:', arguments, v_btoa.apply(this, arguments)):v_btoa.apply(this, arguments) }) }
}
if (e["config-hook-domobj"]){
$domobj_placeholder
@ -295,6 +301,7 @@ chrome.storage.sync.get([
"config-hook-cookie",
"config-hook-settimeout",
"config-hook-setinterval",
"config-hook-encrypt-normal",
"config-hook-JSON.parse",
"config-hook-JSON.stringify",
"config-hook-decodeURI",
@ -303,6 +310,8 @@ chrome.storage.sync.get([
"config-hook-encodeURIComponent",
"config-hook-escape",
"config-hook-unescape",
"config-hook-atob",
"config-hook-btoa",
"config-hook-alt-w",
"config-hook-domobj",
"config-hook-domobj-get",

View File

@ -11,9 +11,7 @@
<br/>
<label ><input type="checkbox" data-key="config-hook-alt-w">启动 alt + w 快捷键(快捷键开启/关闭日志,当前焦点需在网页上才有效)</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-test">test</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-console">hook-console使用 v_log 替换 console.log 并将其他属性设置为空函数)</label>
<label ><input type="checkbox" data-key="config-hook-console">hook-console使用 v_log 替换 console.log 并将 console 的属性都设置为空函数)</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-Function">hook-Function</label>
<br/>
@ -27,31 +25,38 @@
<br/>
<label ><input type="checkbox" data-key="config-hook-setinterval">hook-setinterval</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-JSON.parse">hook-JSON.parse</label>
<label ><input type="checkbox" data-key="config-hook-encrypt-normal">hook-自带加解密函数</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-JSON.stringify">hook-JSON.stringify</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-JSON.parse">hook-JSON.parse</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-decodeURI">hook-decodeURI</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-JSON.stringify">hook-JSON.stringify</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-decodeURIComponent">hook-decodeURIComponent</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-decodeURI">hook-decodeURI</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-encodeURI">hook-encodeURI</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-decodeURIComponent">hook-decodeURIComponent</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-encodeURIComponent">hook-encodeURIComponent</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-encodeURI">hook-encodeURI</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-escape">hook-escape</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-encodeURIComponent">hook-encodeURIComponent</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-unescape">hook-unescape</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-escape">hook-escape</label>
<br/>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-unescape">hook-unescape</label>
<br/>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-atob">hook-atob</label>
<br/>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-btoa">hook-btoa</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-domobj">hook-domobj</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-domobj-get"> - hook-domobj-显示get输出</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-domobj-get">hook-domobj-显示get输出</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-domobj-set"> - hook-domobj-显示set输出</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-domobj-set">hook-domobj-显示set输出</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-domobj-func"> - hook-domobj-显示func输出</label>
<label style="margin-left: 20px"><input type="checkbox" data-key="config-hook-domobj-func">hook-domobj-显示func输出</label>
<br/>
<label ><input type="checkbox" data-key="config-hook-test">test插件开发者测试用</label>
<br/>
<br/>
<div>AST解密混淆</div>