/images/zsm.jpg

TGCTF2025

前言

rank33,感觉自己还是太菜了,放一部分的wp

题目

crypto

AAAAAAAA·真·签到 |solved by zsm

task

1
2
3
4
5
6
给你flag签个到好了
UGBRC{RI0G!O04_5C3_OVUI_DV_MNTB}
诶,我的flag怎么了????
好像字母对不上了
我的签到怎么办呀,急急急
听说福来阁好像是TGCTF开头的喔

思路就是先对照,然后对一下思路?UGBRC和TGCTF进行比较,位移是-1,0,1…,猜测每个增加1,搓个脚本 exp.py

Study nodejs 「5」

nodejs实现定时任务

node-schedule这个模组去实现定时任务 然后这边实现自动登录校园网的(,首先先bp抓个包,发现里面东西有点多,就写了一堆配置文件,然后包成docker去定时发送

Xyctf2025

前言

25年开始以来打的最高质量的密码了?

题目

Division

抢了个血,怪不好意思的 task.py

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import random 
print('----Welcome to my division calc----')
print('''
menu:
      [1]  Division calc
      [2]  Get flag
''')
while True:
    choose = input(': >>> ')
    if choose == '1':
        try:
            denominator = int(input('input the denominator: >>> '))
        except:
            print('INPUT NUMBERS')
            continue
        nominator = random.getrandbits(32)
        if denominator == '0':
            print('NO YOU DONT')
            continue
        else:
            print(f'{nominator}//{denominator} = {nominator//denominator}')
    elif choose == '2':
        try:
            ans = input('input the answer: >>> ')
            rand1 = random.getrandbits(11000)
            rand2 = random.getrandbits(10000)
            correct_ans = rand1 // rand2
            if correct_ans == int(ans):
                print('WOW')
                with open('flag', 'r') as f:
                    print(f'Here is your flag: {f.read()}')
            else:
                print(f'NOPE, the correct answer is {correct_ans}')
        except:
            print('INPUT NUMBERS')
    else:
        print('Invalid choice')

第一时间拿到就知道是mt19937预测随机数,1里面输入1就可以拿到每次的随机数从而预测了 exp.py

Study nodejs 「4」

Redis

docker部署

本地是mac,加上初学不想污染环境,就用docker试试

1
2
3
4
5
docker pull redis
docker run -p 6379:6379 -d - redis-server --appendonly yes
docker rename funny_buck redis
docker exec -it redis redis-cli
//vsc中Database Client可以可视化

字符串命令

1
SET key value [NX|XX] [EX seconds] [PX milliseconds] [GET]

key:要设置的键名。 value:要设置的值。 NX:可选参数,表示只在键不存在时才设置值。 XX:可选参数,表示只在键已经存在时才设置值。 EX seconds:可选参数,将键的过期时间设置为指定的秒数。 PX milliseconds:可选参数,将键的过期时间设置为指定的毫秒数。 GET:可选参数,返回键的旧值。

Study nodejs「3」

MVC

这真的很java吧()

安装依赖

npm install inversify reflect-metadata express inversify-express-util prisma class-validator class-transformer

(数据库的东西用的还是上次的,懒得搞了,然后有个版本问题,npm install inversify-express-utils要求inversify@6.0.3express@4.21.1 )

Study nodejs「2」

nodejs&mysql

现在学mysql和sqlserver(学校老师强制要求的)比较多,就先拿这些举例子了

mysql2

一个把nodejs&mysql&express连接的包,顺便使用js-yaml去写配置