Skip to content

Commit b2e57b9

Browse files
committedNov 22, 2024
Added --fake-domain command like argument.
1 parent 26b554d commit b2e57b9

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
 

‎emulator/WScriptNetwork.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
const lib = require("../lib");
2+
const argv = require("../argv.js").run;
3+
4+
var fakeUserDomain = "";
5+
if (argv["fake-domain"]) {
6+
fakeUserDomain = argv["fake-domain"];
7+
}
28

39
class DriveInfo {
410
constructor(driveLetters) {
@@ -17,7 +23,7 @@ function WScriptNetwork() {
1723
this.enumprinterconnections = () => [{
1824
foo: "bar",
1925
}];
20-
this.userdomain = "";
26+
this.userdomain = fakeUserDomain;
2127
this.username = "harvey_danger";
2228
this.mapnetworkdrive = function(letter, path) {
2329
lib.info(`Script maps network drive ${letter} to path ${path}`);

‎flags.json

+5
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@
8787
"type": "String",
8888
"description": "Specify the language code to return for Win32_OperatingSystem.OSLanguage. Supported values are 'spanish', 'english', and 'portuguese'."
8989
},
90+
{
91+
"name": "fake-domain",
92+
"type": "String",
93+
"description": "Specify the user domain to return for WScript.Network.UserDomain."
94+
},
9095
{
9196
"name": "fake-download",
9297
"type": "Boolean",

0 commit comments

Comments
 (0)
Please sign in to comment.