MeshCMD RPE improvement.
Ylian Saint-Hilaire committed
Jul 18, 2021 at 18:53 UTC
c86e40a275c17cb36f7b89db33af059754b11dfc
3 files changed
+23
-7
agents/meshcmd.js
+8
-6
@@ -2600,12 +2600,14 @@ function performAmtPlatformErase1(stack, name, response, status, args) {
2600
var platfromEraseSupport = response['AMT_BootCapabilities'].response['PlatformErase'];
2601
if (platfromEraseSupport == null) { console.log("Remote Platfrom Erase (RPE) is not supported on this platform"); process.exit(1); return; }
2602
var supportedRpeFeatures = [];
2603
- if (platfromEraseSupport & (1 << 1)) { supportedRpeFeatures.push("Pyrite Revert"); }
2604
- if (platfromEraseSupport & (1 << 2)) { supportedRpeFeatures.push("Secure Erase All SSDs"); }
2605
- if (platfromEraseSupport & (1 << 6)) { supportedRpeFeatures.push("TPM Clear"); }
2606
- if (platfromEraseSupport & (1 << 25)) { supportedRpeFeatures.push("Clear BIOS NVM Variables"); }
2607
- if (platfromEraseSupport & (1 << 26)) { supportedRpeFeatures.push("BIOS Reload of Golden Configuration"); }
2608
- if (platfromEraseSupport & (1 << 31)) { supportedRpeFeatures.push("CSME Unconfigure"); }
2603
+ if (platfromEraseSupport == 0) { supportedRpeFeatures.push("None"); } else {
2604
+ if (platfromEraseSupport & (1 << 1)) { supportedRpeFeatures.push("Pyrite Revert (--pyrite)"); }
2605
+ if (platfromEraseSupport & (1 << 2)) { supportedRpeFeatures.push("Secure Erase All SSDs (--ssd)"); }
2606
+ if (platfromEraseSupport & (1 << 6)) { supportedRpeFeatures.push("TPM Clear (--tpm)"); }
2607
+ if (platfromEraseSupport & (1 << 25)) { supportedRpeFeatures.push("Clear BIOS NVM Variables (--nvm)"); }
2608
+ if (platfromEraseSupport & (1 << 26)) { supportedRpeFeatures.push("BIOS Reload of Golden Configuration (--bios)"); }
2609
+ if (platfromEraseSupport & (1 << 31)) { supportedRpeFeatures.push("CSME Unconfigure (--csme)"); }
2610
+ }
2611
console.log("RPE Supported Features: " + supportedRpeFeatures.join(", "));
2612
2613
// Compute requested operations flags
meshrelay.js
+1
@@ -107,6 +107,7 @@ function CreateMeshRelayEx(parent, ws, req, domain, user, cookie) {
107
parent.relaySessionCount++;
108
109
// Setup slow relay is requested. This will show down sending any data to this peer.
110
+ req.query.slowrelay = 50;
111
if ((req.query.slowrelay != null)) {
112
var sr = null;
113
try { sr = parseInt(req.query.slowrelay); } catch (ex) { }
package.json
+14
-1
@@ -36,6 +36,8 @@
36
"sample-config-advanced.json"
37
],
38
"dependencies": {
39
+ "archiver": "^4.0.2",
40
+ "archiver-zip-encrypted": "^1.0.10",
41
"body-parser": "^1.19.0",
42
"cbor": "~5.2.0",
43
"compression": "^1.7.4",
@@ -43,14 +45,25 @@
45
"express": "^4.17.0",
46
"express-handlebars": "^3.1.0",
47
"express-ws": "^4.0.0",
48
+ "image-size": "^1.0.0",
49
"ipcheck": "^0.1.0",
50
+ "loadavg-windows": "^1.1.1",
51
"minimist": "^1.2.0",
52
+ "mongodb": "^4.0.0",
53
"multiparty": "^4.2.1",
54
"nedb": "^1.8.0",
55
"node-forge": "^0.10.0",
56
+ "node-rdpjs-2": "^0.3.5",
57
+ "node-windows": "^1.0.0-beta.5",
58
+ "nodemailer": "^6.6.3",
59
+ "otplib": "^10.2.3",
60
+ "saslprep": "^1.0.3",
61
+ "ssh2": "^1.1.0",
62
+ "web-push": "^3.4.5",
63
"ws": "^5.2.0",
64
"xmldom": "^0.5.0",
53
- "yauzl": "^2.10.0"
65
+ "yauzl": "^2.10.0",
66
+ "yubikeyotp": "^0.2.0"
67
},
68
"repository": {
69
"type": "git",