mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-01-12 15:33:20 -05:00
Added experimental file-search
This commit is contained in:
parent
c8b465e632
commit
56de99c6a7
@ -2641,6 +2641,22 @@ function createMeshCore(agent) {
|
|||||||
response = "Available commands: \r\n" + fin + ".";
|
response = "Available commands: \r\n" + fin + ".";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'find':
|
||||||
|
if (args['_'].length <= 1)
|
||||||
|
{
|
||||||
|
response = "Proper usage:\r\n find root criteria [criteria2] [criteria n...]";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var root = args['_'][0];
|
||||||
|
var p = args['_'].slice(1);
|
||||||
|
var r = require('file-search').find(root, p);
|
||||||
|
r.sid = sessionid;
|
||||||
|
r.on('result', function (str) { sendConsoleText(str, this.sid); });
|
||||||
|
r.then(function () { sendConsoleText('*** End Results ***', this.sid); });
|
||||||
|
response = "Find: [" + root + "] " + JSON.stringify(p);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'coreinfo': {
|
case 'coreinfo': {
|
||||||
response = JSON.stringify(meshCoreObj, null, 2);
|
response = JSON.stringify(meshCoreObj, null, 2);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user