Created
June 5, 2017 23:09
-
-
Save disconnect3d/6b8196afd607a0f754ef6e739b1fa289 to your computer and use it in GitHub Desktop.
Helper code for Murmus CTF numpy fuzzing/exploitation stream -> https://www.youtube.com/watch?v=v61uh0NJ4_U
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
#!/usr/bin/env python | |
import numpy as np | |
from types import FunctionType, MethodType, BuiltinFunctionType | |
n = np.array("ABC") | |
attr_names = dir(n) | |
for attr in attr_names: | |
val = getattr(n, attr) | |
if attr.startswith('__'): | |
continue | |
if isinstance(val, (FunctionType, MethodType, BuiltinFunctionType)): | |
continue | |
print(hex(id(val)), attr, val) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment