当前位置:网站首页>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
边栏推荐
- How to do product innovation—— Exploration of product innovation methodology I
- Zdns was invited to attend the annual conference of Tencent cloud basic resources and share the 2020 domain name industry development report
- AQS learning
- Remote code execution in Win 11 using wpad / PAC and JScript 3
- [latex] 5 how to quickly write out the latex formula corresponding to the formula
- 【问题解决】‘ascii‘ codec can‘t encode characters in position xx-xx: ordinal not in range(128)
- What is the difference between a host and a server?
- Tencent Qiu Dongyang: techniques and ways of accelerating deep model reasoning
- Modeling based on catiav6
- DNS cloud school | quickly locate DNS resolution exceptions and keep these four DNS status codes in mind
猜你喜欢

Commit and ROLLBACK in DCL of 16mysql
![[latex] 5 how to quickly write out the latex formula corresponding to the formula](/img/1f/3c5a332ce1d6852dde38040faea5bf.png)
[latex] 5 how to quickly write out the latex formula corresponding to the formula

How to protect ECs from hacker attacks?

DNS cloud school rising posture! Three advanced uses of authoritative DNS

Leetcode dynamic planning training camp (1-5 days)

Scrapy教程 - (2)寫一個簡單爬蟲

Devexpress 14.1 installation record
![Azkaban recompile, solve: could not connect to SMTP host: SMTP 163.com, port: 465 [January 10, 2022]](/img/1a/669c330e64af8e75f4b05e472d03d3.png)
Azkaban recompile, solve: could not connect to SMTP host: SMTP 163.com, port: 465 [January 10, 2022]

网络通信基础(局域网、广域网、IP地址、端口号、协议、封装、分用)

【栈和队列专题】—— 滑动窗口
随机推荐
redis 分布式锁
Sqoop imports data from Mysql to HDFS using lzop compression format and reports NullPointerException
Mathematical modeling column | Part 5: MATLAB optimization model solving method (Part I): Standard Model
Remote code execution in Win 11 using wpad / PAC and JScript 1
star
How do BIM swindlers cheat? (turn)
Fundamentals of network communication (LAN, Wan, IP address, port number, protocol, encapsulation and distribution)
Automatically fill in body temperature and win10 task plan
Cadence Orcad Capture CIS更换元器件之Link Database 功能介绍图文教程及视频演示
[latex] 5 how to quickly write out the latex formula corresponding to the formula
SIGIR'22 "Microsoft" CTR estimation: using context information to promote feature representation learning
SQL Server connectors by thread pool 𞓜 instructions for dtsqlservertp plug-in
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executable needs to be in PAT
Commit and ROLLBACK in DCL of 16mysql
Solution to PowerDesigner's failure to connect to MySQL in x64 system
Numpy - creation of data type and array
Change the material of unity model as a whole
上海回应“面粉官网是非法网站”:疏于运维被“黑”,警方已立案
Confusion about thread blocking after calling the read () method of wrapper flow
Common form verification