Warning: session_start(): open(/var/lib/php/sessions/sess_b82o989oni9lg3p0m7l3vrqmla, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
static int jInjectionsTable_updateInterval = 3000;
static JTable jInjectionsTable() {
final JTable tbl = sexyTable();
tablePopupMenu(tbl, voidfunc(JPopupMenu menu, final int row) {
menu.add(jmenuItem("Kill VM", r {
S port = str(getTableLineAsMap(tbl, row).get("VM"));
if (isInteger(port))
killVM(parseInt(port));
}));
menu.add(jmenuItem("Get VM Output", r {
final S port = str(getTableLineAsMap(tbl, row).get("VM"));
thread {
showText("Output of VM " + port, unquote(sendToLocalBot(parseInt(port), "get output")));
}
}));
});
awtCalcRegularly(tbl, jInjectionsTable_updateInterval, 0, r {
long time = sysNow();
new L l;
for (DialogIO vm : talkToAllVMs()) {
pcall {
int vmPort = vm.getPort();
S x = vm.ask("get injections");
S mem = dropUntilColon(vm.ask("how much memory are you consuming"));
//print("VM " + vmPort + " injections: " + x);
L injections = cast safeUnstructure(x);
for (O inj : injections) {
S progID = formatSnippetID((S) get(inj, "progID"));
l.add(litorderedmap(
"Program name", getSnippetTitle(progID),
"Program ID", progID,
"VM Size (Java)", mem,
"VM", vmPort,
"More info", isTrue(get(inj, "mainDone")) ? "main done" : "main running",
"Injection ID", get(inj, "injectionID")));
}
}
vm.close();
}
done2(time, "Scanned " + n(l, "VMs"));
dataToTable(tbl, l);
});
ret tbl;
}