Closed VakarisZ closed 2 weeks ago
Most methods for linux and windows are the same. I wonder if it would make sense to use inheritance
Most methods for linux and windows are the same. I wonder if it would make sense to use inheritance
We tried that initially. It ends up causing more problems than it solves.
We also need the interface to provide a way to get the portion of the command to set the OTP environment variable.
We tried that initially. It ends up causing more problems than it solves.
Right, because of different options, I presume
We also need the interface to provide a way to get the portion of the command to set the OTP environment variable.
Why? OTP is only relevant to the run command and it's best to set it for the duration of the run command (OTP=something /tmp/m0nk3y
). It makes sense to have them together.
We tried that initially. It ends up causing more problems than it solves.
Right, because of different options, I presume
We also need the interface to provide a way to get the portion of the command to set the OTP environment variable.
Why? OTP is only relevant to the run command and it's best to set it for the duration of the run command (
OTP=something /tmp/m0nk3y
). It makes sense to have them together.
If it's not included in the run command (because the run command is in the bash script), it still needs to be set in the environment the bash script runs in.
One solution might be another utility function (maybe a static method on the command builders??) that accepts an OTP as input and generates the necessary command to set the environment variable. the command builder can use this if the otp variable is set and anyone else can use it to generate just that component if they need it.
If it's not included in the run command (because the run command is in the bash script), it still needs to be set in the environment the bash script runs in.
It will be set in the run command that runs the bash script.
run_options = LinuxRunOptions(
dropper_execution_mode=DropperExecutionMode.SCRIPT,
agent_destination_path=f"{FILE_PATH}")
agent_command_builder.build_run_command(run_options)
If it's not included in the run command (because the run command is in the bash script), it still needs to be set in the environment the bash script runs in.
It will be set in the run command that runs the bash script.
run_options = LinuxRunOptions( dropper_execution_mode=DropperExecutionMode.SCRIPT, agent_destination_path=f"{FILE_PATH}") agent_command_builder.build_run_command(run_options)
Ok. Got it.
https://github.com/guardicore/monkey/issues/4201