新年快乐!

诡计多端的烧 0 Jason 把红包藏到哪里了呢? Tips: 真的很简单,瞎试都能试出来好吗(

0x0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <fstream>
#include <iostream>
#include <string>

#define Happy std::cout
#define Year std::endl
#define HappyEveryDay std::ios::in
#define Enjoy main
using New = std::fstream;
using Map = std::string;

int Enjoy() {
  Map bye2024;
  New _2024("/happy.py", HappyEveryDay);
  std::getline(_2024, bye2024);
  Happy << bye2024 << Year;
  _2024.close();
  return 0;
}
cpp

0x1

1
2
3
4
5
import requests
import time

response = requests.get(f"http://hny.jasonz.yt/{int(time.time())}")
print(response.text)
happy.py

0x2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from flask import (
  Flask,
  redirect,
)
import time

app = Flask(__name__)

@app.route("/<time>", methods=["GET"])
def redpacket(time):
  try:
    if int(time) == int(time.time()):
      return redirect("https://jasonz.yt/flag.happyneryear.txt", code=302)
  finally:
    return "Forbidden", 403

if __name__ == "__main__":
  app.run(host="0.0.0.0", port=2025)
python

杂鱼看懂了吗?看不懂的话就拿不到红包咯~~~