Skip to content

Commit

Permalink
docs add gif
Browse files Browse the repository at this point in the history
  • Loading branch information
kajweb committed Oct 27, 2020
1 parent 2dc9af8 commit 5faa931
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 10 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ A `Chrome Extension` and `system proxy` for **disable** the **debugger** functi



## 运行效果

- 未使用程序

![TurnOff.gif](https://i.loli.net/2020/10/28/YpXkGZhVa5Hi6Lx.gif)

- 使用程序

![TurnOn.gif](https://i.loli.net/2020/10/28/TIqopWDmUzKrO5k.gif)

## 使用说明

本程序分为两个部分:`chrome浏览器拓展``Node系统代理`
Expand Down
18 changes: 10 additions & 8 deletions chrome-extension/js/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,28 +42,28 @@ Function.prototype.constructor = (function( oldFn ) {
if( arguments[0] !== 'debugger' ){
console.log( arguments )
return oldFn.apply(this, arguments);
}
return false;
};
// return false;

let args = [...arguments]
let args = [...arguments];
let arg = args[0];
if (arg) {
if (arg.includes('debugger')) {
arg = annotateDebugger( arg );
args.splice( 0, 1, arg );
successInterception( "constructor", arg );
}
}
};
};
return oldFn.apply(this, args);
}
};
})(Function.prototype.constructor);
successStart( "拦截方法1" );


Function = (function( oldFn ){
return function(){
console.log( arguments )
return oldFn.apply( this, arguments )
// return oldFn.apply( this, arguments )

let args = [...arguments];
let arg = args[args.length-1];
Expand All @@ -80,12 +80,14 @@ successStart( "拦截方法2" );
eval = (function( oldFn ){
return function( arg ){
console.log( arguments )
return oldFn.apply( this, arguments )
// return oldFn.apply( this, arguments )

if( arg.includes("debugger") ){
arg = annotateDebugger( arg );
successInterception( "eval", arg );
}
console.log( "arg" )
console.log( arg )
oldFn.call( this, arg );
}
})(eval)
Expand Down
11 changes: 11 additions & 0 deletions docs/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@ A `Chrome Extension` and `system proxy` for **disable** the **debugger** functi

一个**禁止**`Chrome DevTools`中执行**debugger**的拓展和`系统代理`

## Running Result

- TurnOff

![TurnOff.gif](https://raw.githubusercontent.com/kajweb/stop-debugger/main/docs/static/TurnOff.gif)

- TurnOn

![TurnOn.gif](https://raw.githubusercontent.com/kajweb/stop-debugger/main/docs/static/TurnOn.gif)


## Instructions for use

This program is divided into two parts: `chrome browser extension` and `Node system agent`.
Expand Down
Binary file added docs/static/TurnOff.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/static/TurnOn.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion proxy-serve/src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function isDocModifiable( contentType ){
function pipeIconv( contentType ){
var characterSet = false;
return ( chunk, enc, cb )=>{
console.log( chunk.toString() )
// console.log( chunk.toString() )
let data = false;
if( !characterSet ){
let charsetObj = Encoding.getCharset( contentType, chunk );
Expand Down
3 changes: 2 additions & 1 deletion proxy-serve/src/encoding.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function getZlib( contentEncoding ){
break;
case '':
return { encoding: false };
break;
default:
console.log( contentEncoding )
throw new Error("UnKnow content-encoding");
Expand Down Expand Up @@ -179,7 +180,7 @@ function getCharsetFromMeta( chunk, characterSetDefault ){
*/
function resetCharsetToIconv( charset ){
charset = charset.toLowerCase();
console.log( `[resetChrasetToIconv] ${charset}` );
// console.log( `[resetChrasetToIconv] ${charset}` );
return charset;
}

Expand Down

0 comments on commit 5faa931

Please sign in to comment.