mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-24 06:05:53 -05:00
Added AmtScanOptions.
This commit is contained in:
parent
5bdcb14c46
commit
bd66a125dd
@ -167,6 +167,10 @@
|
||||
"_maxAgentSessions": 100,
|
||||
"maxSingleUserSessions": 10
|
||||
},
|
||||
"_amtScanOptions": [
|
||||
"192.168.15.0/23",
|
||||
"192.168.8.0/24"
|
||||
],
|
||||
"_amtAcmActivation": {
|
||||
"log": "amtactivation.log",
|
||||
"certs": {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3828,17 +3828,27 @@
|
||||
function addAmtScanToMesh(meshid) {
|
||||
if (xxdialogMode) return false;
|
||||
var x = "Enter a range of IP addresses to scan for Intel AMT devices." + '<br /><br />';
|
||||
x += addHtmlValue("IP Range", '<input id=dp1range style=width:184px value="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value="' + "Scan" + '" onclick=addAmtScanToMeshButton()></input>');
|
||||
var amtscanoptions = decodeURIComponent('{{{amtscanoptions}}}').split(',');
|
||||
if (amtscanoptions != '') {
|
||||
x += '<datalist id=iprangelist>';
|
||||
for (var i in amtscanoptions) { x += '<option>' + amtscanoptions[i] + '</option>'; }
|
||||
x += '</datalist>';
|
||||
x += addHtmlValue("IP Range", '<input id=dp1range list=iprangelist style=width:184px placeholder="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value="' + "Scan" + '" onclick=addAmtScanToMeshButton()></input>');
|
||||
} else {
|
||||
x += addHtmlValue("IP Range", '<input id=dp1range list=iprangelist style=width:184px value="192.168.1.0/24" onkeyup=addAmtScanToMeshKeyUp(event) /><input id=dp1rangebutton type=button value="' + "Scan" + '" onclick=addAmtScanToMeshButton()></input>');
|
||||
}
|
||||
x += '<div id=dp1results style="width:100%;height:200px;background-color:white;border:1px gray solid;overflow-y:scroll"></div>';
|
||||
setDialogMode(2, "Scan for Intel® AMT devices", 3, addAmtScanToMeshEx, x, meshid);
|
||||
QE('idx_dlgOkButton', false);
|
||||
QH('dp1results', '<div style=width:100%;text-align:center;margin-top:12px;color:gray;line-height:1.5>Sample IP range values<br />192.168.0.100<br />192.168.1.0/24<br />192.167.0.1-192.168.0.100</div>');
|
||||
focusTextBox('dp1range');
|
||||
addAmtScanToMeshKeyUp();
|
||||
return false;
|
||||
}
|
||||
|
||||
function addAmtScanToMeshKeyUp(e) {
|
||||
if (e.keyCode == 13) { haltEvent(e); addAmtScanToMeshButton(); }
|
||||
QE('dp1rangebutton', (Q('dp1range').value.split('.').length > 3));
|
||||
if (e && (e.keyCode == 13)) { haltEvent(e); addAmtScanToMeshButton(); }
|
||||
}
|
||||
|
||||
// Called when OK is pressed on the Intel AMT scanning box
|
||||
|
@ -2237,6 +2237,11 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
// Clean up the U2F challenge if needed
|
||||
if (req.session.u2fchallenge) { delete req.session.u2fchallenge; };
|
||||
|
||||
// Intel AMT Scanning options
|
||||
var amtscanoptions = '';
|
||||
if (typeof domain.amtscanoptions == 'string') { amtscanoptions = encodeURIComponent(domain.amtscanoptions); }
|
||||
else if (obj.common.validateStrArray(domain.amtscanoptions)) { domain.amtscanoptions = domain.amtscanoptions.join(','); amtscanoptions = encodeURIComponent(domain.amtscanoptions); }
|
||||
|
||||
// Fetch the web state
|
||||
parent.debug('web', 'handleRootRequestEx: success.');
|
||||
obj.db.Get('ws' + user._id, function (err, states) {
|
||||
@ -2254,7 +2259,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
||||
if (domain.customui != null) { customui = encodeURIComponent(JSON.stringify(domain.customui)); }
|
||||
|
||||
// Refresh the session
|
||||
render(req, res, getRenderPage('default', req, domain), getRenderArgs({ authCookie: authCookie, authRelayCookie: authRelayCookie, viewmode: viewmode, currentNode: currentNode, logoutControls: encodeURIComponent(JSON.stringify(logoutcontrols)).replace(/'/g, '%27'), domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: obj.getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, passRequirements: passRequirements, customui: customui, webcerthash: Buffer.from(obj.webCertificateFullHashs[domain.id], 'binary').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'), footer: (domain.footer == null) ? '' : domain.footer, webstate: encodeURIComponent(webstate), pluginHandler: (parent.pluginHandler == null) ? 'null' : parent.pluginHandler.prepExports() }, req, domain));
|
||||
render(req, res, getRenderPage('default', req, domain), getRenderArgs({ authCookie: authCookie, authRelayCookie: authRelayCookie, viewmode: viewmode, currentNode: currentNode, logoutControls: encodeURIComponent(JSON.stringify(logoutcontrols)).replace(/'/g, '%27'), domain: domain.id, debuglevel: parent.debugLevel, serverDnsName: obj.getWebServerName(domain), serverRedirPort: args.redirport, serverPublicPort: httpsPort, noServerBackup: (args.noserverbackup == 1 ? 1 : 0), features: features, sessiontime: args.sessiontime, mpspass: args.mpspass, passRequirements: passRequirements, customui: customui, webcerthash: Buffer.from(obj.webCertificateFullHashs[domain.id], 'binary').toString('base64').replace(/\+/g, '@').replace(/\//g, '$'), footer: (domain.footer == null) ? '' : domain.footer, webstate: encodeURIComponent(webstate), amtscanoptions: amtscanoptions, pluginHandler: (parent.pluginHandler == null) ? 'null' : parent.pluginHandler.prepExports() }, req, domain));
|
||||
});
|
||||
} else {
|
||||
// Send back the login application
|
||||
|
Loading…
Reference in New Issue
Block a user