Created
August 23, 2019 02:02
-
-
Save mozhu1024/9a3896c2a4f46f0650de7860b35f93d6 to your computer and use it in GitHub Desktop.
[Fuzz Unserialize Class] 模糊测试反序列化类 #php #unserialize #class #fuzz
This file contains 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
<?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