Closed charmitro closed 9 months ago
@charmitro What should the default path for creating the .log
file be? Is home/user/
ok? And how could the user customize the path?
@charmitro What should the default path for creating the
.log
file be? Ishome/user/
ok? And how could the user customize the path?
/var/log/
or /var/log/cnc/
or user-specified.
We can't create the cnc
folder from our side though, should we leave that up to the user to set it up?
And if we want the user to specify it, should it be a field in our config that the user specifies the path to keep the logs?
We can't create the
cnc
folder from our side though, should we leave that up to the user to set it up?
If the directory doesn't exist, we create it
And if we want the user to specify it, should it be a field in our config that the user specifies the path to keep the logs?
Yes, a config field.
@charmitro What should the default path for creating the
.log
file be? Ishome/user/
ok? And how could the user customize the path?
/var/log/
or/var/log/cnc/
or user-specified.
@panosfol and ofcourse, $HOME/
if left unspecified and no superuser rights. So in total,
/var/log/cnc/
$HOME/
if /var/log/cnc
fails due to superuser rights[general]
log_location = a/path/here
Description
Currently, our application captures the STDOUT/STDERR of a subprocess directly into a buffer, which is then processed and used within the application, such as for constructing an email body. This method, while effective, has its limitations in terms of scalability and efficiency, especially when dealing with large amounts of output data. To improve upon this, we propose to enhance our output handling mechanism by piping the STDOUT/STDERR of subprocesses directly to a file. This approach will not only help in managing large output more effectively but also simplify the process of logging and debugging.
Expected Benefits
Proposed Changes
execve_binary
function to redirect STDOUT/STDERR to a specific file instead of capturing it in a buffer.cncDDMMYY_HHMMSS.log
), ensuring no conflicts or overwrites occur.Potential Challenges