https://github.com/emlinhax/monkey-detect
Detect Tampermonkey scripts by stackwalking
https://github.com/emlinhax/monkey-detect
anticheat browser-game hooking javascript security
Last synced: over 1 year ago
JSON representation
Detect Tampermonkey scripts by stackwalking
- Host: GitHub
- URL: https://github.com/emlinhax/monkey-detect
- Owner: emlinhax
- Created: 2023-05-31T16:01:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-31T16:26:25.000Z (about 3 years ago)
- Last Synced: 2023-07-23T22:24:15.437Z (almost 3 years ago)
- Topics: anticheat, browser-game, hooking, javascript, security
- Language: JavaScript
- Homepage:
- Size: 8.94 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# monkey-detect
Detect Tampermonkey scripts by stackwalking
This script will detect running tampermonkey that call functions on your site.\
This could be used as an anti cheating mechanism or whatever you want.\
PS: I recommend to obfuscate the script and hide it well so people dont find it immediatly.
During testing it was able to detect alot of pretty well known tampermonkey scripts\
for the popular browser game diep.io which proved that the concept works!
Usage:
```javascript
// argument 1: the class/namespace you want to watch all the functions of (example: window, CanvasRenderingContext2D, ...)
// argument 2: the blacklist (functions that will not be hooked)
// argument 3: a callback (that takes the function name as an argument).
hook(window, ["alert"], exampleCallback)
function exampleCallback(name) {
console.log("[monkey-detect] " + name + " was called by a tampermonkey script")
document.body.innerHTML = "
Please disable TamperMonkey!
";
}
```
