Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/processes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function getProcesses(

function processWmi(wmi: string): ProcessModel[] {
wmi = wmi.replaceAll("\\", "|");
const regex = /\{([^{}]+)\}.?/gims; // match withing class ManagementObject { ... }
const regex = /\{([^{}]+)\}.?/gims; // match within class ManagementObject { ... }
const matches = wmi.matchAll(regex);
const rtnVal: ProcessModel[] = [];

Expand Down
2 changes: 1 addition & 1 deletion src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function processDependsWmi(wmi: string): Array<DependenciesModel> {
*/
function processWmi(wmi: string, isSystemDriver: boolean): ServiceModel[] {
wmi = wmi.replaceAll("\\", "|");
const regex = /\{([^{}]+)\}.?/gims; // match withing class ManagementObject { ... }
const regex = /\{([^{}]+)\}.?/gims; // match within class ManagementObject { ... }
const matches = wmi.matchAll(regex);
const rtnVal: ServiceModel[] = [];

Expand Down
8 changes: 4 additions & 4 deletions src/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ async function getMemory(payload: WinRMPayload): Promise<string> {
}

function getRootMatches(wmi: string): IterableIterator<RegExpMatchArray> {
const regexRoot = /\{([^{}]+)\}.?/gims; // match withing class ManagementObject { ... }
const regexRoot = /\{([^{}]+)\}.?/gims; // match within class ManagementObject { ... }
wmi = wmi.replaceAll("\\", "|");
const matches = wmi.matchAll(regexRoot);
return matches;
Expand Down Expand Up @@ -399,7 +399,7 @@ function process_Disk_Wmi(wmi: string): DiskModel[] {
function processWmiDevice(wmi: string): DeviceModel[] {
wmi = wmi.replaceAll("\\", "|");
wmi = wmi.replaceAll("\r\n\r\n", "\r\n");
const regex = /\{([^{}]+)\}.?/gims; // match withing class ManagementObject { ... }
const regex = /\{([^{}]+)\}.?/gims; // match within class ManagementObject { ... }
const matches = wmi.matchAll(regex);
const rtnVal: DeviceModel[] = [];

Expand All @@ -425,7 +425,7 @@ function processWmiDevice(wmi: string): DeviceModel[] {
function processWmiUser(wmi: string): UserModel[] {
wmi = wmi.replaceAll("\\", "|");
wmi = wmi.replaceAll("\r\n\r\n", "\r\n");
const regex = /\{([^{}]+)\}.?/gims; // match withing class ManagementObject { ... }
const regex = /\{([^{}]+)\}.?/gims; // match within class ManagementObject { ... }
const matches = wmi.matchAll(regex);
const rtnVal: UserModel[] = [];

Expand Down Expand Up @@ -465,7 +465,7 @@ function processWmiUser(wmi: string): UserModel[] {
function processWmiGroup(wmi: string): GroupModel[] {
wmi = wmi.replaceAll("\\", "|");
wmi = wmi.replaceAll("\r\n\r\n", "\r\n");
const regex = /\{([^{}]+)\}.?/gims; // match withing class ManagementObject { ... }
const regex = /\{([^{}]+)\}.?/gims; // match within class ManagementObject { ... }
const matches = wmi.matchAll(regex);
const rtnVal: GroupModel[] = [];

Expand Down
Loading