mirror of https://github.com/MISP/MISP
Ensure we only have the last line from the shell command when exporting STIX2
Same as e3b1e8c74a
but for exporting STIX2
pull/5672/head
parent
57077f62ff
commit
44fef2903c
|
@ -19,6 +19,8 @@ class Stix2Export extends StixExport
|
|||
$scriptFile = $this->__scripts_dir . $this->__script_name;
|
||||
$filename = $this->__scripts_dir . 'tmp/' . $filename;
|
||||
$my_server = ClassRegistry::init('Server');
|
||||
return shell_exec($my_server->getPythonVersion() . ' ' . $scriptFile . ' ' . $filename . $this->__end_of_cmd);
|
||||
$result = shell_exec($my_server->getPythonVersion() . ' ' . $scriptFile . ' ' . $filename . $this->__end_of_cmd);
|
||||
$result = end(preg_split("/\r\n|\n|\r/", trim($result)));
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue