mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-03-03 15:20:06 -05:00
recording not recoding
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
9df0330896
commit
7faf043c35
2
mcrec.js
2
mcrec.js
@ -321,7 +321,7 @@ function setup() { InstallModules(['image-size'], start); }
|
|||||||
function start() { startEx(process.argv); }
|
function start() { startEx(process.argv); }
|
||||||
function startEx(argv) {
|
function startEx(argv) {
|
||||||
if (argv.length > 2) { indexFile(argv[2]); } else {
|
if (argv.length > 2) { indexFile(argv[2]); } else {
|
||||||
log("MeshCentral Session Recodings Processor");
|
log("MeshCentral Session Recordings Processor");
|
||||||
log("This tool will index a .mcrec file so that the player can seek thru the file.");
|
log("This tool will index a .mcrec file so that the player can seek thru the file.");
|
||||||
log("");
|
log("");
|
||||||
log(" Usage: node mcrec [file]");
|
log(" Usage: node mcrec [file]");
|
||||||
|
@ -847,7 +847,7 @@ function CreateDesktopMultiplexor(parent, domain, nodeid, id, func) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Write the recording file header
|
// Write the recording file header
|
||||||
parent.parent.debug('relay', 'Relay: Started recoding to file: ' + recFullFilename);
|
parent.parent.debug('relay', 'Relay: Started recording to file: ' + recFullFilename);
|
||||||
var metadata = { magic: 'MeshCentralRelaySession', ver: 1, nodeid: obj.nodeid, meshid: obj.meshid, time: new Date().toLocaleString(), protocol: 2, devicename: obj.name, devicegroup: obj.meshname };
|
var metadata = { magic: 'MeshCentralRelaySession', ver: 1, nodeid: obj.nodeid, meshid: obj.meshid, time: new Date().toLocaleString(), protocol: 2, devicename: obj.name, devicegroup: obj.meshname };
|
||||||
var firstBlock = JSON.stringify(metadata);
|
var firstBlock = JSON.stringify(metadata);
|
||||||
recordingEntry(fd, 1, 0, firstBlock, function () {
|
recordingEntry(fd, 1, 0, firstBlock, function () {
|
||||||
|
@ -445,15 +445,15 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
|||||||
relayinfo.peer1.sendPeerImage();
|
relayinfo.peer1.sendPeerImage();
|
||||||
} else {
|
} else {
|
||||||
// Write the recording file header
|
// Write the recording file header
|
||||||
parent.parent.debug('relay', 'Relay: Started recoding to file: ' + recFullFilename);
|
parent.parent.debug('relay', 'Relay: Started recording to file: ' + recFullFilename);
|
||||||
var metadata = {
|
var metadata = {
|
||||||
magic: 'MeshCentralRelaySession',
|
magic: 'MeshCentralRelaySession',
|
||||||
ver: 1,
|
ver: 1,
|
||||||
userid: sessionUser._id,
|
userid: sessionUser._id,
|
||||||
username: sessionUser.name,
|
username: sessionUser.name,
|
||||||
sessionid: obj.id,
|
sessionid: obj.id,
|
||||||
ipaddr1: (obj.req == null) ? null : obj.req.clientIp,
|
ipaddr1: ((obj.peer == null) || (obj.peer.req == null)) ? null : obj.peer.req.clientIp,
|
||||||
ipaddr2: ((obj.peer == null) || (obj.peer.req == null)) ? null : obj.peer.req.clientIp,
|
ipaddr2: (obj.req == null) ? null : obj.req.clientIp,
|
||||||
time: new Date().toLocaleString(),
|
time: new Date().toLocaleString(),
|
||||||
protocol: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.p),
|
protocol: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.p),
|
||||||
nodeid: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.nodeid)
|
nodeid: (((obj.req == null) || (obj.req.query == null)) ? null : obj.req.query.nodeid)
|
||||||
@ -512,7 +512,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
|
|||||||
if (obj.req.query.p == 1) { msg = 'Started terminal session'; msgid = 14; }
|
if (obj.req.query.p == 1) { msg = 'Started terminal session'; msgid = 14; }
|
||||||
else if (obj.req.query.p == 2) { msg = 'Started desktop session'; msgid = 15; }
|
else if (obj.req.query.p == 2) { msg = 'Started desktop session'; msgid = 15; }
|
||||||
else if (obj.req.query.p == 5) { msg = 'Started file management session'; msgid = 16; }
|
else if (obj.req.query.p == 5) { msg = 'Started file management session'; msgid = 16; }
|
||||||
var event = { etype: 'relay', action: 'relaylog', domain: domain.id, userid: sessionUser._id, username: sessionUser.name, msgid: msgid, msgArgs: [obj.id, req.clientIp, obj.peer.req.clientIp], msg: msg + ' \"' + obj.id + '\" from ' + req.clientIp + ' to ' + obj.peer.req.clientIp, protocol: req.query.p, nodeid: req.query.nodeid };
|
var event = { etype: 'relay', action: 'relaylog', domain: domain.id, userid: sessionUser._id, username: sessionUser.name, msgid: msgid, msgArgs: [obj.id, obj.peer.req.clientIp, req.clientIp], msg: msg + ' \"' + obj.id + '\" from ' + obj.peer.req.clientIp + ' to ' + req.clientIp, protocol: req.query.p, nodeid: req.query.nodeid };
|
||||||
if (obj.guestname) { event.guestname = obj.guestname; } else if (relayinfo.peer1.guestname) { event.guestname = relayinfo.peer1.guestname; } // If this is a sharing session, set the guest name here.
|
if (obj.guestname) { event.guestname = obj.guestname; } else if (relayinfo.peer1.guestname) { event.guestname = relayinfo.peer1.guestname; } // If this is a sharing session, set the guest name here.
|
||||||
parent.parent.DispatchEvent(['*', sessionUser._id], obj, event);
|
parent.parent.DispatchEvent(['*', sessionUser._id], obj, event);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user