当前位置:网站首页>2022dasctf APR x fat epidemic prevention challenge crypto easy_ real
2022dasctf APR x fat epidemic prevention challenge crypto easy_ real
2022-04-23 20:22:00 【After the rain &】
Not at all , Yes . Only the sign in question of password
Title Description
import random
import hashlibflag = 'xxxxxxxxxxxxxxxxxxxx'
key = random.randint(1,10)
for i in range(len(flag)):
crypto += chr(ord(flag[i])^key)
m = crypto Of ascii Hexadecimal
e = random.randint(1,100)
print(hashlib.md5(e))
p = 64310413306776406422334034047152581900365687374336418863191177338901198608319
q = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
n = p*q
c = pow(m,e,n)
print(n)
print(c)
#37693cfc748049e45d87b8c7d8b9aacd
#4197356622576696564490569060686240088884187113566430134461945130770906825187894394672841467350797015940721560434743086405821584185286177962353341322088523
#3298176862697175389935722420143867000970906723110625484802850810634814647827572034913391972640399446415991848730984820839735665233943600223288991148186397
It's not hard to see from the code that
#37693cfc748049e45d87b8c7d8b9aacd Corresponding to the corresponding e Of md5 value
Go to the corresponding website to decrypt
e=23
Others are defined separately
n=4197356622576696564490569060686240088884187113566430134461945130770906825187894394672841467350797015940721560434743086405821584185286177962353341322088523
c=3298176862697175389935722420143867000970906723110625484802850810634814647827572034913391972640399446415991848730984820839735665233943600223288991148186397
p = 64310413306776406422334034047152581900365687374336418863191177338901198608319
According to the code , It's not hard for us to see , This is typical rsa encryption
Directly find the value of plaintext
from Crypto.Util.number import inverse,long_to_bytes
n=4197356622576696564490569060686240088884187113566430134461945130770906825187894394672841467350797015940721560434743086405821584185286177962353341322088523
c=3298176862697175389935722420143867000970906723110625484802850810634814647827572034913391972640399446415991848730984820839735665233943600223288991148186397
p = 64310413306776406422334034047152581900365687374336418863191177338901198608319
q=n//p
e=23
phi=(q-1)*(p-1)
d=inverse(e,phi)
m = pow(c, d, n)
print(m);
//m=2976168736142380455841784134407431434784057911773423743751382131043957
//m="ndios_;9kgE;WK8e;W?gWn<\;k|nu"
Let's continue to observe
key It's a random value
But there is scope
Let's go straight to violence
import random
import hashlib
import math
from Crypto.Util.number import inverse,long_to_bytes
n=4197356622576696564490569060686240088884187113566430134461945130770906825187894394672841467350797015940721560434743086405821584185286177962353341322088523
c=3298176862697175389935722420143867000970906723110625484802850810634814647827572034913391972640399446415991848730984820839735665233943600223288991148186397
p = 64310413306776406422334034047152581900365687374336418863191177338901198608319
q=n//p
e=23
phi=(q-1)*(p-1)
d=inverse(e,phi)
m = pow(c, d, n)
print(m);
m="ndios_;9kgE;WK8e;W?gWn<\;k|nu"
for key in range(11):
flag=""
for i in range(len(m)):
flag+=chr(ord(m[i])^key)
print(flag)
Go straight out flag
Playing so many games , Or vegetables? .
Many questions didn't reappear after the game , What a failed vegetable chicken , Purring .
There are too few teachers to communicate in the school , It's said that the United team is recruiting new people recently , Ready to try .
版权声明
本文为[After the rain &]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204232020423016.html
边栏推荐
- CVPR 2022 | querydet: use cascaded sparse query to accelerate small target detection under high resolution
- SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
- 论文写作 19: 会议论文与期刊论文的区别
- [talkative cloud native] load balancing - the passenger flow of small restaurants has increased
- ArcGIS JS version military landmark drawing (dovetail arrow, pincer arrow, assembly area) fan and other custom graphics
- Es index (document name) fuzzy query method (database name fuzzy query method)
- Alicloud: could not connect to SMTP host: SMTP 163.com, port: 25
- star
- Monte Carlo py solves the area problem! (save pupils Series)
- . Ren -- the intimate artifact in the field of vertical Recruitment!
猜你喜欢
DNS cloud school rising posture! Three advanced uses of authoritative DNS
Automatically fill in body temperature and win10 task plan
堡垒机、跳板机JumpServer的搭建,以及使用,图文详细
Handwritten Google's first generation distributed computing framework MapReduce
go-zero框架数据库方面避坑指南
【栈和队列专题】—— 滑动窗口
网络通信基础(局域网、广域网、IP地址、端口号、协议、封装、分用)
Matlab analytic hierarchy process to quickly calculate the weight
考研英语唐叔的语法课笔记
Mysql database backup scheme
随机推荐
Introduction to link database function of cadence OrCAD capture CIS replacement components, graphic tutorial and video demonstration
A useless confession artifact
Paper writing 19: the difference between conference papers and journal papers
How about CICC fortune? Is it safe to open an account
RT-1052学习笔记 - GPIO架构分析
2022 - Data Warehouse - [time dimension table] - year, week and holiday
The ODB model calculates the data and outputs it to excel
Sqoop imports tinyint type fields to boolean type
Numpy sort search count set
Some basic knowledge of devexpress report development
Building the tide, building the foundation and winning the future -- the successful holding of zdns Partner Conference
Browser - learning notes
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线、自定义计算交叉点、自定义配置indifference函数的参数丰富可视化效果
PCL点云处理之基于PCA的几何形状特征计算(五十二)
Modeling based on catiav6
2022DASCTF Apr X FATE 防疫挑战赛 CRYPTO easy_real
SQL Server Connectors By Thread Pool | DTSQLServerTP plugin instructions
Mysql database backup scheme
After route link navigation, the sub page does not display the navigation style problem
堡垒机、跳板机JumpServer的搭建,以及使用,图文详细