<?php highlight_file(__FILE__); error_reporting(0); functionbest64_decode($str) { returnbase64_encode(md5(base64_encode(md5($str)))); } classyesterday{ public$learn; public$study="study"; public$try; publicfunction__construct() { $this->learn = "learn<br>"; } publicfunction__destruct() { echo"You studied hard yesterday.<br>"; return$this->study->hard(); } } classtoday{ public$doing; public$did; public$done; publicfunction__construct(){ $this->did = "What you did makes you outstanding.<br>"; } publicfunction__call($arg1, $arg2) { $this->done = "And what you've done has given you a choice.<br>"; echo$this->done; if(md5(md5($this->doing))==666){ return$this->doing(); } else{ return$this->doing->better; } } } classtommoraw{ public$good; public$bad; public$soso; publicfunction__invoke(){ $this->good="You'll be good tommoraw!<br>"; echo$this->good; } publicfunction__get($arg1){ $this->bad="You'll be bad tommoraw!<br>"; }
} classfuture{ private$impossible="How can you get here?<br>"; private$out; private$no; public$useful1;public$useful2;public$useful3;public$useful4;public$useful5;public$useful6;public$useful7;public$useful8;public$useful9;public$useful10;public$useful11;public$useful12;public$useful13;public$useful14;public$useful15;public$useful16;public$useful17;public$useful18;public$useful19;public$useful20;
publicfunction__set($arg1, $arg2) { if ($this->out->useful7) { echo"Seven is my lucky number<br>"; system('whoami'); } } publicfunction__toString(){ echo"This is your future.<br>"; system($_POST["wow"]); return"win"; } publicfunction__destruct(){ $this->no = "no"; return$this->no; } } if (file_exists($_GET['filename'])){ echo"Focus on the previous step!<br>"; } else{ $data=substr($_GET['filename'],0,-4); unserialize(best64($data)); } // You learn yesterday, you choose today, can you get to your future? ?>
from pyramid.config import Configurator from pyramid.request import Request from pyramid.response import Response from pyramid.view import view_config from wsgiref.simple_server import make_server from pyramid.events import NewResponse import re from jinja2 import Environment, BaseLoader
defhome_view(request): expr_input = "" result = ""
if request.method == 'POST': expr_input = request.POST['expr'] if checkExpr(expr_input): try: result = eval(expr_input, eval_globals) except Exception as e: result = e else: result = "爬!"
if __name__ == '__main__': with Configurator() as config: config.add_route('home_view', '/') config.add_view(home_view, route_name='home_view') app = config.make_wsgi_app()
server = make_server('0.0.0.0', 9040, app) server.serve_forever()