Created
March 16, 2016 21:43
-
-
Save jld/ebb64b56ab80d7f55ae7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ctypes | |
| libc = ctypes.CDLL("libc.so.6", use_errno = True) | |
| if __name__ == '__main__': | |
| set_rv = libc.prctl(22, 2, 0) | |
| set_errno = ctypes.get_errno() | |
| print("prctl(PR_SET_SECCOMP, 2, NULL) = %d errno %d" % (set_rv, set_errno)) | |
| get_rv = libc.prctl(21) | |
| print("prctl(PR_GET_SECCOMP) = %d" % get_rv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment