Complete the code to define a sandbox environment that isolates code execution.
sandbox = [1]()The Sandbox class represents an isolated environment to safely run untrusted code.
Complete the code to start monitoring suspicious behavior inside the sandbox.
sandbox.start_monitoring([1])behavior_analysis is used to detect suspicious actions during sandbox execution.
Fix the error in the code that runs untrusted code inside the sandbox.
sandbox.run_code([1])The sandbox is designed to safely run untrusted_code to prevent harm to the system.
Fill both blanks to create a sandbox that limits resource usage and logs activity.
sandbox = Sandbox(limit=[1], log=[2])
The sandbox limits cpu usage and enables logging by setting log=True.
Fill all three blanks to filter files accessed in the sandbox and check if size is above threshold.
filtered_files = {f: size for f, size in sandbox.files.items() if size [1] [2] and f.endswith([3])}This code filters files larger than 1024 bytes and ending with '.exe' extension.