It can be used to break out from restricted environments by spawning an interactive system shell.
script -q /dev/null
It writes data to files, it may be used to do privileged writes or write files outside a restricted file system.
The wrote content is corrupted by debug prints.
script -q -c 'echo DATA' file_to_write
It runs in privileged context and may be used to access the file system, escalate or maintain access with elevated privileges if enabled on
sudo ./script -q /dev/null