This file is indexed.

/usr/lib/python2.7/dist-packages/notebook/static/terminal/js/terminado.js is in python-notebook 5.2.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
define (["xterm"], function(Terminal) {
    "use strict";
    function make_terminal(element, size, ws_url) {
        var ws = new WebSocket(ws_url);
        var term = new Terminal({
          cols: size.cols,
          rows: size.rows
        });
        ws.onopen = function(event) {
            ws.send(JSON.stringify(["set_size", size.rows, size.cols,
                                        window.innerHeight, window.innerWidth]));
            term.on('data', function(data) {
                ws.send(JSON.stringify(['stdin', data]));
            });
            
            term.on('title', function(title) {
                document.title = title;
            });
            
            term.open(element);
            
            ws.onmessage = function(event) {
                var json_msg = JSON.parse(event.data);
                switch(json_msg[0]) {
                    case "stdout":
                        term.write(json_msg[1]);
                        break;
                    case "disconnect":
                        term.write("\r\n\r\n[CLOSED]\r\n");
                        break;
                }
            };
        };
        return {socket: ws, term: term};
    }

    return {make_terminal: make_terminal};
});