diff --git a/lib/processes.js b/lib/processes.js index 35fe94b..126d7d8 100644 --- a/lib/processes.js +++ b/lib/processes.js @@ -492,7 +492,7 @@ function processes(callback) { function checkColumn(i) { offset = offset2; if (parsedhead[i]) { - offset2 = line.substring(parsedhead[i].to + offset, 1000).indexOf(' '); + offset2 = line.substring(parsedhead[i].to + offset, 10000).indexOf(' '); } else { offset2 = 10000; } @@ -525,7 +525,9 @@ function processes(callback) { checkColumn(11); const user = line.substring(parsedhead[11].from + offset, parsedhead[11].to + offset2).trim(); checkColumn(12); - const fullcommand = line.substring(parsedhead[12].from + offset, parsedhead[12].to + offset2).trim().replace(/\[/g, '').replace(/]/g, ''); + let fullcommand = line.substring(parsedhead[12].from + offset, parsedhead[12].to + offset2).trim(); + if (fullcommand.substr(0, 1) === '[') { fullcommand = fullcommand.substring(1); } + if (fullcommand.substr(fullcommand.length - 1) === ']') { fullcommand = fullcommand.slice(0, -1); } let cmdPath = ''; let command = ''; let params = '';