Skip to content

Instantly share code, notes, and snippets.

@disconnect3d
Created June 5, 2017 23:09
Show Gist options
  • Save disconnect3d/6b8196afd607a0f754ef6e739b1fa289 to your computer and use it in GitHub Desktop.
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
#!/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