Skip to content

Instantly share code, notes, and snippets.

@mozhu1024
Created August 23, 2019 02:02
Show Gist options
  • Save mozhu1024/9a3896c2a4f46f0650de7860b35f93d6 to your computer and use it in GitHub Desktop.
Save mozhu1024/9a3896c2a4f46f0650de7860b35f93d6 to your computer and use it in GitHub Desktop.
[Fuzz Unserialize Class] 模糊测试反序列化类 #php #unserialize #class #fuzz
<?php
$classes = get_declared_classes();
foreach ($classes as $class) {
$methods = get_class_methods($class);
foreach ($methods as $method) {
if (in_array($method, [
'__destruct',
'__toString',
'__wakeup',
'__call',
'__callStatic',
'__get',
'__set',
'__isset',
'__unset',
'__invoke',
'__set_state',
])) {
print $class . '::' . $method . "\n";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment