Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

Commit

Permalink
big magic:
Browse files Browse the repository at this point in the history
  • Loading branch information
hrt committed Nov 17, 2019
1 parent 4e81908 commit bc93dac
Show file tree
Hide file tree
Showing 6 changed files with 495 additions and 415 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
1.8.9



Become a cripple, use a WheelChair...


# Gold Standard WheelChair
Note: certain features have been removed but it should still destroy
Remove all exisiting scripts. Wheelchair is now a chromium based extension that will stop you from having to reinstalling scripts.

1. Install tamper monkey
2. Create new script -> paste the code from `user.script.js` and save
1. Navigate to your chromium browsers extensions page
2. Enable developer mode (probably a checkbox in the top right)
3. [Download this unpacked extension](https://github.com/hrt/WheelChair/releases/download/2.0/loader.zip)
4. Click on "Load unpacked extension" and select the downloaded zip file

http://youtube.com/hrtbot
[![WheelChair](https://i.imgur.com/FXvZhq3.png)](http://youtube.com/hrtbot)
Expand Down
46 changes: 46 additions & 0 deletions loader/chairloader.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
* much nicer injection than what extensions like tampermonkey offer us
* great against stack traces (VM:XX rather than ..extension/script.js or userscript..)
* sandboxed environment (unmodified native functions)
* faster than tamper monkeys "document_start"
* injects into all frames with high priority
*/

try {
(ttap)(hrt);
} catch(e) {
try {
let recursing = e.stack.match(/chairloader/g).length > 1;
if (!recursing) {
// must be synchronous to force execution before other scripts
// note: we fetch the same code for each iframe
let request = new XMLHttpRequest();
request.open('GET', 'https://raw.githubusercontent.com/hrt/WheelChair/master/wheelchair.min.js', false);
request.send(null);
if (request.status != 200) {
console.error('Error GET wheelchair: ' + request.status);
}

const unique_string = chrome.runtime.getURL('').match(/\/\/(\w{9})\w+\//)[1];
let code = request.responseText.replace(/ttap#4547/g, unique_string);

// inject our code into a new iframe to avoid using hooks placed by anti cheat
let frame = document.createElement('iframe');
frame.setAttribute('style', 'display:none');
document.documentElement.appendChild(frame);
let child = frame.contentDocument || frame.contentWindow.document;
let chair = document.createElement('script');
chair.innerHTML = code;
child.documentElement.append(chair);
child.documentElement.remove(chair);
document.documentElement.removeChild(frame);
}
} catch (e) {
if (e instanceof DOMException) {
// expected for sandboxed iframes
console.warn(e);
} else {
throw e;
}
}
}
8 changes: 8 additions & 0 deletions loader/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "",
"version": "2.0.0",
"manifest_version": 2,
"description": "https://github.com/hrt/wheelchair",
"content_scripts": [
{"matches":["https://krunker.io/", "https://krunker.io/*game*"],"run_at": "document_start","js": ["chairloader.js"],"all_frames":true,"match_about_blank":true}]
}
Loading

0 comments on commit bc93dac

Please # to comment.