密码(6)

一、[NCTF 2019]Keyboard——键盘密码

1.题目:

ooo yyy ii w uuu ee uuuu yyy uuuu y w uuu i i rr w i i rr rrr uuuu rrr uuuu t ii uuuu i w u rrr ee www ee yyy eee www w tt ee

2.解题:

这些字母是26键盘上的第一行,每个字母对应上面的数字,而且每个字母数为1-4位,说明是九键键盘。

这种题写法就是比如o,对应9,就在九键键盘上9的位置,看o有多少位,3位的话,就是9那个位置字符串的第三个字符。得到

youaresosmartthatthisisjustapieceofcake

二、[MoeCTF 2022]vigenere——维吉尼亚密码

1.题目:

fwoslehgl wcw ecfxshmw lcoaju dk rhsxwhnlrhf
mt voswxzkiluw cbhl ilnurjkbsh, vujxdfnfn swx oktizkbcngfon uxfktgrmscy sh tiawa atbidiun, jnenfdwb, umw nqymbnqr xwvfmuqwx ri hjmrptuy, swnhonupk biembdmw, ocqxbdgd, nhbkdsoaxh rhkwrsay, kxldg druabqloq, bybnwloq jqzkjqzkb umw yuvawcmz, fqy kx znkyk. ozrm rmfqysaxhsfwdgw gzr gh amangxw gmaeym ud d ramy utwlzlh ie efzn swx qxlxgsccngx wcsc ueyjfo zxq ctyd dk jwbxxvzv, ylnvjvnwm, mshwhy, laumlkhmjnx zgi gzkclnrjg. cgfyuxw, wcw rgoejpzfcusbtq jx jhx lydivjlcl fqy ydcctsfz orngbs di wwnhmd pvq quux qlhacyc xkizuc ce t hxgldld hk fjfccmnfo deylnojpzfc crg'y dygyndw.

2.

使用在线网站解码,得到:

information security, sometimes shortened to infosec, is the practice of protecting information by mitigating information risks. it is part of information risk management. it typically involves preventing or reducing the probability of unauthorized/inappropriate access to data, or the unlawful use, disclosure, disruption, deletion, corruption, modification, inspection, recording, or devaluation of information. it also involves actions intended to reduce the adverse impacts of such incidents. protected information may take any form, e.g. electronic or physical, tangible (e.g. paperwork) or intangible (e.g. knowledge). information security's primary focus is the balanced protection of the confidentiality, integrity, and availability of data (also known as the cia triad) while maintaining a focus on efficient policy implementation, all without hampering organization productivity. this is largely achieved through a structured risk management process that involves:
1. identifying information and related assets, plus potential threats, vulnerabilities, and impacts;
2. evaluating the risks
3. deciding how to address or treat the risks i.e. to avoid, mitigate, share or accept them
4. where risk mitigation is required, selecting or designing appropriate security controls and implementing them
5. monitoring the activities, making adjustments as necessary to address any issues, changes and improvement opportunities
6. i won't tell you that the flag is moectf attacking the vigenere cipher is interesting
to standardize this discipline, academics and professionals collaborate to offer guidance, policies, and industry standards on password, antivirus software, firewall, encryption software, legal liability, security awareness and training, and so forth. this standardization may be further driven by a wide variety of laws and regulations that affect how data is accessed, processed, stored, transferred and destroyed. however, the implementation of any standards and guidance within an entity may have limited effect if a culture of continual improvement isn't adopted.

翻译一下,得到flag

NSSCTF{attacking the vigenere cipher is interesting}

三、[GDOUCTF 2023]Absolute_Baby_Encrytpion

1.题目:

Alice用脚本向Bob发送了以下消息。 这是用JS写的。 Bob对JS一无所知。 你能帮忙看看留言吗?+}!q")hiim)#}-nvm)i-$#mvn#0mnbm)im#n+}!qnm8)i-$#mvnoc#0nz<$9inm!>-n1:1-nm8)i-$~c58n!}qhij#0[noic##m8nc8n?!8c}w!n]>&
let messagetoEncrypt = prompt("Enter a string: ").toLowerCase();
let charArray = messagetoEncrypt.split("");
let encryptedString = "";
let hasInvalidCharacter = false;for (let i = 0; i < charArray.length; i++) {switch (charArray[i]) {case 'a':encryptedString = encryptedString.concat('!')break;case 'b':encryptedString = encryptedString.concat('1')break;case 'c':encryptedString = encryptedString.concat(')')break;case 'd':encryptedString = encryptedString.concat('v')break;case 'e':encryptedString = encryptedString.concat('m')break;case 'f':encryptedString = encryptedString.concat('+')break;case 'g':encryptedString = encryptedString.concat('q')break;case 'h':encryptedString = encryptedString.concat('0')break;case 'i':encryptedString = encryptedString.concat('c')break;case 'j':encryptedString = encryptedString.concat(']')break;case 'k':encryptedString = encryptedString.concat('(')break;case 'l':encryptedString = encryptedString.concat('}')break;case 'm':encryptedString = encryptedString.concat('[')break;case 'n':encryptedString = encryptedString.concat('8')break;case 'o':encryptedString = encryptedString.concat('5')break;case 'p':encryptedString = encryptedString.concat('$')break;case 'q':encryptedString = encryptedString.concat('*')break;case 'r':encryptedString = encryptedString.concat('i')break;case 's':encryptedString = encryptedString.concat('>')break;case 't':encryptedString = encryptedString.concat('#')break;case 'u':encryptedString = encryptedString.concat('<')break;case 'v':encryptedString = encryptedString.concat('?')break;case 'w':encryptedString = encryptedString.concat('o')break;case 'x':encryptedString = encryptedString.concat('^')break;case 'y':encryptedString = encryptedString.concat('-')break;case 'z':encryptedString = encryptedString.concat('_')break;case '0':encryptedString = encryptedString.concat('h')break;case '1':encryptedString = encryptedString.concat('w')break;case '2':encryptedString = encryptedString.concat('e')break;case '3':encryptedString = encryptedString.concat('9')break;case '4':encryptedString = encryptedString.concat('g')break;case '5':encryptedString = encryptedString.concat('z')break;case '6':encryptedString = encryptedString.concat('d')break;case '7':encryptedString = encryptedString.concat('~')break;case '8':encryptedString = encryptedString.concat('=')break;case '9':encryptedString = encryptedString.concat('x')break;case '!':encryptedString = encryptedString.concat('j')break;case '@':encryptedString = encryptedString.concat(':')break;case '#':encryptedString = encryptedString.concat('4')break;case '$':encryptedString = encryptedString.concat('b')break;case '%':encryptedString = encryptedString.concat('`')break;case '^':encryptedString = encryptedString.concat('l')break;case '&':encryptedString = encryptedString.concat('3')break;case '*':encryptedString = encryptedString.concat('t')break;case '(':encryptedString = encryptedString.concat('6')break;case ')':encryptedString = encryptedString.concat('s')break;case '_':encryptedString = encryptedString.concat('n')break;case '+':encryptedString = encryptedString.concat(';')break;case '-':encryptedString = encryptedString.concat('\'')break;case '=':encryptedString = encryptedString.concat('r')break;case '`':encryptedString = encryptedString.concat('k')break;case '~':encryptedString = encryptedString.concat('p')break;case '{':encryptedString = encryptedString.concat('\"')break;case '}':encryptedString = encryptedString.concat('&')break;case '[':encryptedString = encryptedString.concat('/')break;case ']':encryptedString = encryptedString.concat('\\')break;case '|':encryptedString = encryptedString.concat('2')break;case ':':encryptedString = encryptedString.concat('.')break;case ';':encryptedString = encryptedString.concat('%')break;case '\"':encryptedString = encryptedString.concat('|')break;case '\'':encryptedString = encryptedString.concat(',')break;case '<':encryptedString = encryptedString.concat('@')break;case '>':encryptedString = encryptedString.concat('{')break;case ',':encryptedString = encryptedString.concat('u')break;case '.':encryptedString = encryptedString.concat('7')break;case '?':encryptedString = encryptedString.concat('y')break;case '/':encryptedString = encryptedString.concat('a')break;default:hasInvalidCharacter = true;}
}if (hasInvalidCharacter) {encryptedString = "Invalid String!";
} else {console.log(`Your encoded string is ${encryptedString}`);
}

这段代码是将不同的字符映射为其他的字符

3.

#这段代码定义了一个字典list,将一些特殊字符映射为一些字母和数字。
list = {'!': 'a', '1': 'b', ')': 'c', 'v': 'd', 'm': 'e', ' ': 'f',
'q': 'g', '0': 'h', 'c': 'i', ']': 'j', '(': 'k', '}': 'l', '[': 'm', '8': 'n',
'5': 'o', '$': 'p', '*': 'q', 'i': 'r', '>': 's', '#': 't', '<': 'u', '?': 'v', 'o': 'w', '^': 'x', '-': 'y',
'_': 'z', 'h': '0', 'w': '1', 'e': '2', '9': '3', 'g': '4', 'z': '5', 'd': '6', '~': '7', '=': '8', 'x': '9', 'j': '!', ':': '@', '4': '#', 'b': '$', '`': '%', 'l': '^',
'3': '&', 't': '*', '6': '(', 's': ')', 'n': '_', ';': ' ', '\\': '-', '&': '}', '/': '[', '\\\\': '{', '2': 'l', '.': ':', '%': ';', '|': '\\',
',': '\\', '@': '<', '{': '>', 'u': ',', '7': '.', 'y': '?', 'a': '//', '"': '{'}
miwen =' }!q")hiim)#}-nvm)i-$#mvn#0mnbm)im#n }!qnm8)i-$#mvnoc#0nz<$9inm!>-n1:1-nm8)i-$~c58n!}qhij#0[noic##m8nc8n?!8c}w!n]>&'
m = ''
for i in miwen:m += list[i]
print(m)

NSSCTF{c0rrectly_decrypted_the_$ecret_flag_encrypted_with_5up3r_easy_b@by_encryp7ion_alg0r!thm_written_in_vanil1a_js}
 

四、[红明谷CTF 2022]easy_ya

1、题目:

from Crypto.Util.number import *
import osfrom flag import flag
def gen():e = 3while True:try:p = getPrime(512)q = getPrime(512)n = p*qphi = (p-1)*(q-1)d = inverse(e,phi)return p,q,d,n,eexcept:continuereturn
p,q,d,n,e = gen()
r = getPrime(512)
m = bytes_to_long(flag+os.urandom(32))
M = m%r
c = pow(m,e,n)
print("r = %d"%r)
print("M = %d"%M)
print("n = %d"%n)
print("e = %d"%e)
print("c = %d"%c)  # 数据类型
'''
r = 7996728164495259362822258548434922741290100998149465194487628664864256950051236186227986990712837371289585870678059397413537714250530572338774305952904473
M = 4159518144549137412048572485195536187606187833861349516326031843059872501654790226936115271091120509781872925030241137272462161485445491493686121954785558
n = 131552964273731742744001439326470035414270864348139594004117959631286500198956302913377947920677525319260242121507196043323292374736595943942956194902814842206268870941485429339132421676367167621812260482624743821671183297023718573293452354284932348802548838847981916748951828826237112194142035380559020560287
e = 3
c = 46794664006708417132147941918719938365671485176293172014575392203162005813544444720181151046818648417346292288656741056411780813044749520725718927535262618317679844671500204720286218754536643881483749892207516758305694529993542296670281548111692443639662220578293714396224325591697834572209746048616144307282
'''

2.解题:

m =M+k∗r,则有c≡(M+kr) **3(mod n)
考虑构造模多项式f=(M+kr) **3 −c (mod n),求解小根得到k

然后根据公式m =M+k∗r,得到flag

3.

#sageN = 131552964273731742744001439326470035414270864348139594004117959631286500198956302913377947920677525319260242121507196043323292374736595943942956194902814842206268870941485429339132421676367167621812260482624743821671183297023718573293452354284932348802548838847981916748951828826237112194142035380559020560287
e = 3
c = 46794664006708417132147941918719938365671485176293172014575392203162005813544444720181151046818648417346292288656741056411780813044749520725718927535262618317679844671500204720286218754536643881483749892207516758305694529993542296670281548111692443639662220578293714396224325591697834572209746048616144307282
M = 4159518144549137412048572485195536187606187833861349516326031843059872501654790226936115271091120509781872925030241137272462161485445491493686121954785558
r = 7996728164495259362822258548434922741290100998149465194487628664864256950051236186227986990712837371289585870678059397413537714250530572338774305952904473
kbits = 100
P.<x> = PolynomialRing(ZmodN)
f = (M + r*x)**e - c
f=f.monic() # x系数不为1的时候需要用这个归一
x0 = f.small_roots(x=2^kbits, beta=1)[0]  # 这里的X选取不像上文用的是临界值,而是选了一个我们未知的x的最大可能值。X的选取并非严格,但至少得保证比临界值小。
print(x0)
# 810968823598060539864535# python
import libnumr = 7996728164495259362822258548434922741290100998149465194487628664864256950051236186227986990712837371289585870678059397413537714250530572338774305952904473
M = 4159518144549137412048572485195536187606187833861349516326031843059872501654790226936115271091120509781872925030241137272462161485445491493686121954785558
n = 131552964273731742744001439326470035414270864348139594004117959631286500198956302913377947920677525319260242121507196043323292374736595943942956194902814842206268870941485429339132421676367167621812260482624743821671183297023718573293452354284932348802548838847981916748951828826237112194142035380559020560287
e = 3
c = 46794664006708417132147941918719938365671485176293172014575392203162005813544444720181151046818648417346292288656741056411780813044749520725718927535262618317679844671500204720286218754536643881483749892207516758305694529993542296670281548111692443639662220578293714396224325591697834572209746048616144307282
k = 810968823598060539864535m = M+k*r
print(libnum.n2s(int(m)))

得到:

b'flag{53a2e494-964d-4506-a2c4-c34b9475dedd}W\xf1X6\xacP\x9bc~9\xfd\x0f\x96\xbf\x92\xb9+\xe5\xebPJ\x17\xc4\xb2\xe8\xad\x01\n\xf2j\xae\x15'

NSSCTF{53a2e494-964d-4506-a2c4-c34b9475dedd}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/32041.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

redis类型解析汇总

redis类型解析汇总 介绍数据类型简介主要数据类型&#xff1a;衍生类型&#xff1a; 字符串&#xff08;String&#xff09;底层设计原理图例设计优势字符串使用方法设置字符串值获取字符串值获取和设置部分字符串获取字符串长度追加字符串设置新值并返回旧值递增/递减同时设置…

通过 WireGuard 组建虚拟局域网 实现多个局域网全互联

本文后半部分代码框较多,欢迎点击原文链接获得更佳的阅读体验。 前言 上一篇关于 WireGuard 的文章通过 Docker 安装 wg-easy 的形式来使用 WireGuard,但 wg-easy 的功能比较有限,并不能发挥出 WireGuard 的全部功力。 如果只是想要出门在外连随时随地的连回家里的局域网,…

067、Python 高阶函数的编写:优质冒泡排序

以下写了个简单的冒泡排序函数&#xff1a; def bubble_sort(items: list) -> list:for i in range(1, len(items)):swapped Falsefor j in range(0, len(items) - 1):if items[j] > items[j 1]:items[j], items[j 1] items[j 1], items[j]swapped Trueif not swa…

UCOS高频面试题及参考答案(2万字长文)

目录 UCOS-II/UCOS-III的基本特点和适用场景 UCOS-II与UCOS-III的主要区别 UCOS的任务状态 OS_ENTER_CRITICAL()和OS_EXIT_CRITICAL()函数 UCOS-III任务调度过程 时间片轮转调度与UCOS-II 创建UCOS任务的步骤 使用UCOS信号量进行任务同步 信号量与互斥量的区别 UCOS中…

[数据集][目标检测]棉花叶子害虫检测数据集VOC+YOLO格式571张1类别

数据集格式&#xff1a;Pascal VOC格式YOLO格式(不包含分割路径的txt文件&#xff0c;仅仅包含jpg图片以及对应的VOC格式xml文件和yolo格式txt文件) 图片数量(jpg文件个数)&#xff1a;595 标注数量(xml文件个数)&#xff1a;595 标注数量(txt文件个数)&#xff1a;595 标注类别…

Linux驱动调试——使用DEVICE_ATTR实现cat、echo指令调试驱动

在平常做一些驱动调试的时候&#xff0c;每次都写应用去调试相对较麻烦&#xff0c;有一个非常便捷的操作方法就是使用device_attr&#xff0c;只需要执行shell指令例如echo和cat就可以看到效果&#xff0c;不需要再单独写一个测试demo。 看网上很多博客在这一块的使用上写的都…

FENDI CLUB精酿啤酒与小麦的不解之缘

FENDI CLUB精酿啤酒与小麦之间这种联系体现在啤酒的酿造原料、口感特色以及文化内涵等多个方面。以下是关于这两者之间关系的详细分析&#xff1a; 一、酿造原料的紧密联系 小麦作为关键原料&#xff1a;FENDI CLUB精酿啤酒在酿造过程中&#xff0c;小麦是不可或缺的原料之一…

Mybatis 系列全解(1)——全网免费最细最全,手把手教,学完就可做项目!

Mybatis 系列全解&#xff08;1&#xff09; 1. 第一个小程序2. CURD 增删改查3. 模糊查询4. 配置解析4.1 核心配置文件4.2 环境配置4.3 属性4.4 类型别名4.5 设置4.6 映射器 mappers 1. 第一个小程序 1&#xff09;创建一个数据库&#xff0c;一个表&#xff0c;填入一些数据…

OpenAI项目爆改GLM——以基于llama_index的pdf阅读助手

最近在做大模型agent构建&#xff0c;看了许多不错的开源项目&#xff0c;但是clone下来就是一整个不能用&#xff0c;因为github上开源的项目基本都是基于openai做的。而如果想要转成国内大模型backbone&#xff0c;需要修改的地方挺多的。 现在以一个简单的pdf reader agent…

【Qt】QList<QVariantMap>中数据修改

1. 问题 QList<QVariantMap> 类型中&#xff0c;修改QVariantMap中的值。 2. 代码 //有效代码1QVariantMap itemMap itemList.at(0);itemMap.insert("title", "test");itemList.replace(0, itemMap);//有效代码 2itemList.operator [](0).insert(…

17岁中专生姜萍数学竞赛成绩可信吗?

数学竞赛已经消失很久&#xff0c;但是因为焦虑家长存在需求&#xff0c;”赢在赛跑起点“的认知偏见&#xff0c;以及学术象牙塔为自己存在寻求存在理由和荣誉感&#xff0c;等诸多因素&#xff0c;最近一名17岁女中专生闯入某个互联网企业举办的民间数学决赛&#xff0c;引发…

Python3简单实现与Java的Hutool库SM2的加解密互通

1、背景&#xff1a; 因业务需求&#xff0c;需要与某平台接口对接。平台是Java基于Hutool库实现的SM2加密解密&#xff0c;研究了下SM2的加解密算法&#xff0c;网上找的资料&#xff0c;都是说SM2【椭圆曲线】 公钥长【x,y分量 64字节】&#xff0c;私钥短【32字节】&#x…

华为---OSPF被动接口配置(四)

9.4 OSPF被动接口配置 9.4.1 原理概述 OSPF被动接口也称抑制接口&#xff0c;成为被动接口后&#xff0c;将不会接收和发送OSPF报文。如果要使OSPF路由信息不被某一网络中的路由器获得且使本地路由器不接收网络中其他路由器发布的路由更新信息&#xff0c;即已运行在OSPF协议…

FuTalk设计周刊-Vol.031

&#x1f525;AI漫谈 热点捕手 1、如何用自然语言 5 分钟构建个人知识库应用&#xff1f;我的 GPTs builder 尝试 开发者的想象力闸门一旦打开&#xff0c;迎接我们的必然是目不暇接的 AI 应用浪潮冲击。 链接https://sspai.com/post/84325 2、GPT-4 Turbo、功能融合&#x…

Android的OverlayFS原理与作用

标签: OverlayFS; Android;Overlay Filesystem; Android的OverlayFS原理与作用 概述 OverlayFS(Overlay Filesystem)是一种联合文件系统,允许将一个或多个文件系统叠加在一起,使它们表现为一个单一的文件系统。Android系统利用OverlayFS来实现动态文件系统的叠加和管…

Java延迟初始化Logger日志对象

开源项目SDK&#xff1a;https://github.com/mingyang66/spring-parent 个人文档&#xff1a;https://mingyang66.github.io/raccoon-docs/#/ 将日志Logger对象定义在静态内部类中是一种常见的做法&#xff0c;这样做是有它特殊的好处&#xff0c;示例如下&#xff1a; privat…

MDPI期刊汇总(AI方向)

前言 本blog统计了计算机和工程领域的期刊&#xff0c;常见分区包括三种&#xff0c;中科院分区&#xff0c;JCR分区&#xff0c;CiteScore分区&#xff0c;下面分别介绍这三种分区的区别&#xff1a; 1. 中科院分区 中科院分区是中国科学院发布的期刊评价体系&#xff0c;涵…

【机器学习】大模型驱动下的医疗诊断应用

摘要&#xff1a; 随着科技的不断发展&#xff0c;机器学习在医疗领域的应用日益广泛。特别是在大模型的驱动下&#xff0c;机器学习为医疗诊断带来了革命性的变化。本文详细探讨了机器学习在医疗诊断中的应用&#xff0c;包括疾病预测、图像识别、基因分析等方面&#xff0c;并…

Qt 技术博客:深入理解 Qt 中的 delete 和 deleteLater 与信号槽机制

在 Qt 开发中&#xff0c;内存管理和对象生命周期的处理是至关重要的一环。特别是在涉及信号和槽机制时&#xff0c;如何正确删除对象会直接影响应用程序的稳定性。本文将详细讨论在使用 Qt 的信号和槽机制时&#xff0c;delete 和 deleteLater 的工作原理&#xff0c;并给出最…

IOS Swift 从入门到精通: For 循环, While 循环, 重复循环, 退出循环, 退出多重循环, 跳过项目, 无限循环

文章目录 For 循环While 循环重复循环退出循环退出多重循环跳过项目无限循环总结 For 循环 Swift 有几种编写循环的方法&#xff0c;但它们的底层机制是相同的&#xff1a;重复运行一些代码&#xff0c;直到条件计算为假。 Swift 中最常见的循环是一个for循环&#xff1a;它将…