<!DOCTYPE html>


<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>