processes() fixed issue truncated params

This commit is contained in:
Sebastian Hildebrandt 2021-02-11 21:12:40 +01:00
parent 8d80e97e05
commit 40b16dac9a

View File

@ -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 = '';