Command Execution

PyPty

Python stdlib module — pty. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.close()Neutral
#
Signature
close(fd)

Close a file descriptor.

.fork()Neutral
#
Signature
fork()

fork() -> (pid, master_fd)

.master_open()Neutral
#
Signature
master_open()

master_open() -> (master_fd, slave_name)

.openpty()Neutral
#
Signature
openpty()

openpty() -> (master_fd, slave_fd)

.select()Neutral
#
Signature
select(rlist, wlist, xlist, timeout)

Wait until one or more file descriptors are ready for some kind of I/O.

.setraw()Neutral
#
Signature
setraw(fd, when)

Put terminal into a raw mode.

.slave_open()Neutral
#
Signature
slave_open(tty_name)

slave_open(tty_name) -> slave_fd

.spawn()Neutral
#
Signature
spawn(argv, master_read, stdin_read)

Create a spawned process.

.tcgetattr()Neutral
#
Signature
tcgetattr(fd)

Get the tty attributes for file descriptor fd.

.tcsetattr()Neutral
#
Signature
tcsetattr(fd, when, attributes)

Set the tty attributes for file descriptor fd.

Fully-Qualified Names

FQNField
ptyfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

rule.py
import pty