Python bindings for some OpenBSD-specific APIs. Currently the following are supported:
pledge
unveil
* Initial release.
Openbsd is on PyPI. You can install it using pip:
pip install openbsd
Import openbsd
first:
import openbsd
See: https://man.openbsd.org/pledge.2
openbsd.pledge("stdio rpath")
print(open("/etc/resolv.conf"))
Try removing the`rpath permission.
See: https://man.openbsd.org/unveil.2
openbsd.unveil("/etc", "r")
print(open("/etc/resolv.conf"))
Try opening /bin/ksh
.
Use openbsd.unveil()
to lock down restrictions.
(c) 2019 Yuce Tekol