BUUCTF Web wp
[ACTF2020 新生赛]Exec 输入127.0.0.1;ls 发现真的把 index.php(也就是ls的操作结果)真的输出了,说明没有过滤分号 最终在127.0.0.1;cd ../../../;ls找到了flag文件 输入127.0.0.1;cd ../../../;ls得到flag flag:flag{4e3b851f-9a72-42c9-a57a-d6698548cdc0} [GXYCTF2019]Ping Ping Ping发现有一个/?ip= 根据上一题的经验,我们输入/?ip=127.0.0.1;ls,得到 得知不能输入空格 所以我们需要绕过空格使用一下平替 123456789101112${IFS}$9{IFS}$IFS${IFS}$IFS$1 //$1改成$加其他数字貌似都行IFS< <> {cat,flag.php} //用逗号实现了空格功能,需要用{}括起来%20 (space)%09 ...
BUUCTF RE wp
easyre F5一下出 直接打开的话,结束之后自动闪退,所以要用cmd flag:flag{this_Is_a_EaSyRe} reverse1shift+F12,然后Ctrl+F搜索关键词flag 双击进入,ctrl+x查看交叉引用 然后点击F5查看源码 得到这一段内容,选中数字单击 r 可以转化为ascll码对应的字母 可以知道,for循环把str2的 o 替换为 0 双击 str2...
厦大一日游(机器人大赛)
原文链接 原文发表日期...
Codeforces Round 965 (Div. 2) 题解
题目链接 逆天抽象局,ab都是构造题, A. Find K Distinct Points with Fixed Center 12345678910111213141516171819202122232425#include<iostream>#define int long longusing namespace std;int t , x , y , k;signed main(){ cin >> t; while( t -- ){ cin >> x >> y >> k; if( k % 2 ){ cout << x << " " << y << endl; for(int i = 1;i <= (k-1)/2;i ++){ cout << x-i <<...
Codeforces Round 964 (Div.4)题解
题目链接 差一道题就ak了,打代码的速度还是慢了点 F时间不够了,于是随便糊了个时间复杂度不对的算法,结果算法对了,少了个预处理然后就TLE了,赛时没有发现 A.A+B Again? 1234567891011#include<iostream>using namespace std;int t , n;signed main(){ cin >> t; while( t -- ){ cin >> n; cout << (n/10)+(n%10) << endl; } return 0;} B.Card Game 直接穷举所有可能性即可 思路不是很难,就看如何实现了 123456789101112131415161718192021222324252627282930#include<iostream>#define int long longusing namespace std;int t ,...
数位板+onenote铅笔橡皮快速切换的实现方式
配置:高漫1060pro + windows11 + onenote(office最新版) 众所周知onenote最新版取消了笔收藏夹这一选项,导致选择画笔很不方便,一般情况下无法使画笔和橡皮快速切换,在一番探索下得到了以下方案 笔者之前使用c++做过控制键鼠点击等程序,但是黑窗口弹出需要一定时间很不方便,在和朋友交流下得到了知道了有一个叫AutoHotkey的编程语言,专门用来进行这样的操作 由上图可以知道切换画笔的操作是Alt+D+G+键盘右键*多次+键盘左键(切回黑色画笔)+Enter 这样就可以编写ahk脚本 12345678910111213141516171819202122232425262728Send {Alt Down}Sleep 50Send {Alt Up}Send {D Down}Sleep 50Send {D Up}Send {G Down}Sleep 50Send {G Up}Send {Right...
CRYTPO 24.8第一周刷题记录
[SWPUCTF 2021 新生赛]crypto3 123456789101112131415161718192021from gmpy2 import *from Crypto.Util.number import *flag = '******************'p = getPrime(512)q = getPrime(512)m1 = bytes_to_long(bytes(flag.encode()))n = p*qflag1 = pow(m1,p,n)flag2 = pow(m1,q,n)print('flag1= '+str(flag1))print('flag2= '+str(flag2))print('n= '+str(n))#flag1=...
Codeforces Round 963 (Div. 2)题解
题目链接 本场比赛应该算是今年我打的第一场算法竞赛,也是NOIP2021结束之后难得发挥出来的比赛。ABC都是比较简单的题,D是二分+dp,比较难想 E最终还是不会,疑似是一个高级dp A.Question Marks 观察样例就能打出来 12345678910111213141516171819202122232425#include<iostream>#include<string>using namespace std;signed main(){ int t;cin >> t; while( t -- ){ string s;int n;cin >> n;cin >> s; int a , b , c , d , e;a = b = c = d = e = 0; for(int i = 0;i < s.length();i ++){ if( s[i] == 'A' ) a ++;...
BUUCTF crypto wp
[NewStarCTF 2023 公开赛道]Rabin’s RSA12345678910111213141516171819from Crypto.Util.number import *from secret import flagp = getPrime(64)q = getPrime(64)assert p % 4 == 3assert q % 4 == 3n = p * qe = 2m = bytes_to_long(flag)c = pow(m,e,n)print('n =', n)print('c =', c)# n = 201354090531918389422241515534761536573# c = 20442989381348880630046435751193745753 Rabin加密算法——一种基于摸平方和模平方根的非对称加密 特点: 同一密文,可能有两个以上对应的明文 破解该体制等价于对大整数的分解 满足 $p\equiv 3\mod4$ 且 $q\equiv 3\mod4$ Rabin密码体制选取...