-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathshell.html
More file actions
26 lines (25 loc) · 773 Bytes
/
Copy pathshell.html
File metadata and controls
26 lines (25 loc) · 773 Bytes
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
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://unpkg.com/jquery.terminal@2.x.x/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/jquery.terminal@2.x.x/css/jquery.terminal.min.css"/>
<script>
$(function() {
$('body').terminal(function(command, term) {
var args = {cmd: "eval", val: command};
var jqxhr = $.get('http://192.168.88.1/cgi-bin/cmd', args)
.always(function (data) {
ret = data.responseText.substring(data.responseText.lastIndexOf("----------------") + 17);
term.echo(ret);
});
}, {
greetings: 'PrinCube Shell',
prompt: '# '
});
});
</script>
</head>
<body>
</body>
</html>