当前位置:网站首页>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
边栏推荐
- star
- PCL点云处理之计算两平面交线(五十一)
- Numpy sort search count set
- Analysis of the relationship between generalized Bim and CAD under the current background
- The second method of file upload in form form is implemented by fileitem class, servletfileupload class and diskfileitemfactory class.
- Plato Farm元宇宙IEO上线四大,链上交易颇高
- Investigate why close is required after sqlsession is used in mybatties
- Computing the intersection of two planes in PCL point cloud processing (51)
- NC basic usage 1
- DTMF dual tone multi frequency signal simulation demonstration system
猜你喜欢
STM32 Basics
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT
The ODB model calculates the data and outputs it to excel
【目标跟踪】基于帧差法结合卡尔曼滤波实现行人姿态识别附matlab代码
Don't bother tensorflow learning notes (10-12) -- Constructing a simple neural network and its visualization
go-zero框架数据库方面避坑指南
Identification of bolt points in aerial photography based on perception
Leetcode dynamic planning training camp (1-5 days)
JDBC tool class jdbcfiledateutil uploads files and date format conversion, including the latest, simplest and easiest way to upload single files and multiple files
Numpy Index & slice & iteration
随机推荐
[graph theory brush question-5] Li Kou 1971 Find out if there is a path in the graph
Markdown < a > tag new page open link
16MySQL之DCL 中 COMMIT和ROllBACK
R language uses econocrats package to create microeconomic or macroeconomic map, visualize indifference function indifference curve, customize calculation intersection, and customize the parameters of
Operation of numpy array
JDBC tool class jdbcfiledateutil uploads files and date format conversion, including the latest, simplest and easiest way to upload single files and multiple files
Automatically fill in body temperature and win10 task plan
JDBC tool class jdbcconutil gets the connection to the database
三十一. `prototype`显示原型属性和`__proto__`隐式原型属性
Some basic configurations in interlij idea
一. js的深拷贝和浅拷贝
DTMF dual tone multi frequency signal simulation demonstration system
Numpy - creation of data type and array
三十.什么是vm和vc?
R language uses the preprocess function of caret package for data preprocessing: BoxCox transform all data columns (convert non normal distribution data columns to normal distribution data and can not
Customize timeline component styles
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线、自定义计算交叉点、自定义配置indifference函数的参数丰富可视化效果
ArcGIS js api 4. X submergence analysis and water submergence analysis
DNS cloud school | analysis of hidden tunnel attacks in the hidden corner of DNS
Browser - learning notes