由于上一次分享会没有讲,因此在做了一段时间的题目后,将下边内容补充到上一次的分享内容里。

第一题:浪里淘沙(第三页抬头)

打开题目

看到很大段文本,咋看好像杂乱无章,仔细看似乎是由很多单词组成的文本!

通过长时间的目测法,发现这段文本是

tonight 
success 
notice 
we 
example
crypto
should
backspace
learn
sublim
the
found
system
morning
user
enter

这16个单词多次重复组成,题目提示中有几个数字,也许与单词出现的次数?评率?有关!我们求一下词频,因为源文本中没有换行符或者分隔号,因此整个文本求词频用c稍显复杂(可以按首字母分类,监测到特定首字母即判断后N位是否与上述单词相同....../按长度分类?),我们用python来写求词频脚本。

f = "tonightsuccessnoticenoticewewesuccesstonightweexamplecryptoshouldwebackspacetonightbackspaceexamplelearnwesublimlearnbackspacetheshouldwelearnfoundsublimsystemexamplesublimfoundlearnshouldmorningsublimsystemuserlearnthecryptomorningexamplenoticetonightlearntonightlearntonightsublimenterusermorningfoundtonightweenterfoundnoticethecryptomorningthebackspacelearntonightlearnsublimtonightlearnfoundenterfoundsuccesstonightsuccessuserfoundmorningtonighttheshouldsublimentertonightenterbackspacelearnexamplenoticeexamplefoundsystemsuccesssublimsuccessshouldtonightcryptowelearncryptofoundshouldsublimsublimweentertonightsuccessshouldentertheentercryptouserbackspaceshouldentersystemsuccesssystementerfoundenterlearnexampletonightnoticemorningusertonightlearnmorningtonightfoundfoundsuccessnoticesystementerlearnexamplebackspaceshouldcryptocryptosublimweexampletonighttheshouldthemorningbackspacelearntonightsystemsuccesssuccessbackspacemorningnoticeuserfoundfoundtonightmorningenterenterthefoundbackspacelearnenterentershouldthesystemfounduserlearnlearnsystemnoticetonighttheshouldlearnuserbackspaceweusernoticeshouldthewefoundsystemwecryptocryptowethebackspacesystementershouldtonightsystemnoticemorningsystemweentermorningfoundsuccessusertonightsuccesstonightbackspaceshouldweenterthewesystemusernoticesystemthelearnexamplelearnfoundlearnnoticeexamplesystemthecryptocryptolearnsystemthecryptoenterlearnexamplemorningmorningweenterentersuccessexampleuserthebackspacenoticesublimenterbackspacesuccessbackspacethesublimexamplesystemtheexamplecryptolearnuserexamplelearnsystemusersuccessenterentersuccesstheuserbackspacelearnsuccessbackspacethesublimshouldwebackspaceexamplesuccesssuccesstonightweusershouldsuccessmorningcryptomorningfoundbackspacesublimshouldentershouldnoticesuccessmorningsuccessexamplelearnshouldsublimlearntonightshoulduserbackspacesublimlearncryptosuccessenternoticetonightmorningtonightwesuccessweuserbackspaceexamplewesystemnoticemorningsystemmorningcryptolearnsystemthethefoundcryptouserlearnusersystemwemorningenterexampleshouldlearncryptofoundenterbackspacelearnenterenterbackspaceshouldbackspacetheshouldthesystemshouldshouldsuccessmorningthefoundsystementersystemtonightcryptowelearnexampleexamplesystementerbackspaceshouldtheentersublimtonightfoundfoundsuccesssuccesssystemsublimcryptoshouldentersublimmorninglearnfoundtonightcryptobackspacesuccesscryptowebackspacefoundshouldnoticeshouldmorningnoticesystemcryptosystemlearnsystemnoticemorningsystementerwemorninglearnsuccessfoundwesuccesswetheusercryptousernoticebackspacesuccessshouldtonightmorningentermorninguserenternoticefoundmorningwetonightsystemthecryptotonightcryptosystemuserthefoundexampletonightusersystemcryptosublimmorninguserthefoundbackspaceshouldsuccesscryptotonightsystemnoticebackspaceusershouldenterthecryptomorningwesublimnoticesuccessnoticeusersuccesstonightlearnweuserenterfounduserexampleshouldshouldtonightwelearnthenoticethewefoundmorningexampleshouldexamplethesuccessnoticeenterfoundthecryptonoticeuserlearnuserweenterfoundmorningsystemweexamplenoticethebackspaceexamplesublimtheusermorningtonightthesuccesscryptosuccessusersuccesstonighttonightwelearnenterenterthemorningentersystemcryptobackspacemorningsystemexamplecryptouserexamplelearnsublimsuccessusersystemfoundmorningshouldcryptotonightsublimtheexamplemorningsystemuserexampleweexamplenoticesuccesssublimnoticecryptoshouldbackspaceshouldthetonightfoundsublimbackspacebackspacetonightshouldbackspacesuccesstonightbackspacesuccessmorningsystemcryptobackspaceentertonighttonightnoticelearnshoulduserfoundexamplesystemthesuccessweusertonightcryptousernoticeenternoticebackspaceusersystemfoundusernoticeshouldlearnuserfoundexampleusermorningshouldsuccessmorningmorningexampleexamplefoundsublimfoundenterbackspacenoticelearnfoundmorningcryptonoticecryptoshouldweshouldtonightcryptobackspacesublimcryptosublimenterentersublimentercryptonoticethethesublimexampleenterentershouldlearncryptoentershouldmorninglearnnoticeuserexamplesublimtonightshouldfoundtonightsuccessshouldmorningfoundtheweuserlearnsublimsystembackspacecryptotheusertonightcryptosublimmorningmorningexamplenoticetheenterlearnshouldmorningsublimfoundtonightsublimsublimexamplefounduserexamplethefoundwemorningnoticefoundcryptosuccesssublimsublimexamplethesuccessexamplenoticesuccessbackspacesublimlearnuserexamplesuccesssuccesssystemsuccessmorningmorninglearnexamplemorningtonightfoundbackspaceenternoticemorningentersuccessmorningusermorningbackspacelearncryptoenteruserenteruserthetonighttonightsuccesslearnenterfoundsuccesssystemfoundbackspaceenterlearnsystemsublimcryptoentermorningwetonightshouldlearnenterfoundcryptonoticelearnlearnshouldfoundsuccessexampletonightthesuccessfoundusertonightenterfoundsuccessshouldmorningusernoticemorningsystemsystemsuccessshouldwelearnenterfoundexamplewethefoundweshouldsystemsystemmorningmorningbackspaceshouldentersublimentertonightsuccesssystemsystemcryptousershouldsublimfoundwetonightnoticeexamplewewesuccessfoundusertonightfoundsystemexamplecryptofoundshouldshouldsuccessenterbackspaceexampletonightthelearnnoticeuserlearnsystemsublimfoundlearnsuccesssystemshouldsublimnoticelearnsystemnoticetonightexamplefoundusernoticeenterlearnnoticecryptousersystemmorningthewesystemfoundfoundshouldsystementerenterbackspacesystemsublimcryptousermorninglearnlearntonightsublimlearnenterenterbackspacesystemuserusercryptoentershouldtheusersublimnoticeexamplemorningexamplesublimsublimbackspacesystemexampleshouldsublimlearnfoundenterbackspacelearnmorningmorningfoundthetonightmorningnoticeenterlearnusersystemtonightbackspaceexamplelearntonightbackspaceweshouldcryptosuccessbackspaceexamplesuccesstheshouldmorninguserbackspacelearnthetheshouldcryptocryptotonightbackspacecryptocryptobackspacebackspacenoticeusertonightentermorningfoundweenterexampleenterfoundusersublimsystemtheexampleexamplesystemsuccessusersublimentermorningbackspacesystemfoundlearnsystemshouldsublimsublimentershouldtheusershouldexampleexampleshouldsuccesswelearnfoundsublimshoulduserweentertonightwenoticesublimsystemlearnshouldfoundsuccessuserentersuccessmorningcryptoenteruserfoundexampletonightlearnexampleexamplefoundlearnsuccesssystembackspacecryptonoticethefoundbackspacelearncryptothelearnlearnexamplesuccessnoticenoticesystemmorningcryptotonightnoticenoticeentersuccesscryptoenterbackspacesublimexampleenterfoundtonightcryptotonightsublimnoticesuccesssublimtheentertonighttheshouldthefoundsystemtonightuserbackspacesuccessshouldwebackspacenoticebackspacebackspacenoticewecryptobackspacebackspaceusertonightlearnsuccessmorningusertonightsuccessshouldbackspacecryptoenterentershouldsublimsystemexamplemorningcryptonoticethesuccessthebackspacenoticelearnsublimlearnsuccesscryptothesuccessenternoticecryptosystemsublimsuccesswebackspaceuserenterlearnuserwewemorningsuccesslearncryptobackspacewecryptosystemlearnenterenteruserexamplefoundsystemcryptousernoticefoundusersublimbackspacewesublimnoticemorningshouldexamplenoticecryptoshouldtonightmorningthefoundsystementerentersystemthecryptobackspacesublimlearnsuccessmorningsublimsystemcryptousersublimwesuccessmorningsublimbackspacecryptobackspacesublimthelearnsuccesssublimlearncryptoweweexamplecryptowenoticelearnfoundbackspacesystemsystemexampleshouldlearnsuccesssublimcryptobackspacetonightbackspacemorningmorningnoticeshouldnoticefoundthetheshouldtheshouldfoundfoundcryptosuccessbackspacesuccessshouldweenternoticeweweshouldmorningfoundusersuccessbackspacewenoticeusersuccessenterenterexamplelearnfoundwetonightusercryptothesublimsublimtonightsuccesslearnbackspacetonightentertonightthesublimnoticewefoundcryptobackspaceenterenterlearnlearntonightexamplesystementersublimnoticecryptoshoulduseruserbackspaceuserwesublimmorningwesystemshouldtonighttheusershouldnoticefoundusernoticeentersublimwethewefoundfoundlearnfoundwecryptosystemexamplemorningcryptocryptosublimtheexamplenoticefoundlearnwelearnmorningtheenterthesystemsublimtonightsuccesssystemlearnshouldenterbackspaceentersuccesssuccessbackspaceexamplenoticeentershouldsublimlearnbackspacetheshouldexamplelearnsystemusersublimbackspacebackspacesuccesswelearntonightexamplewecryptoenterwesystemsystemsublimexamplecryptolearnmorningsublimfoundsublimfoundbackspacefoundtonighttonightnoticesuccesssuccessexampleusersuccesstonightsublimcryptosystemweenterexamplesystemthethenoticesublimtonightbackspacenoticesystemexamplethesuccesstonightmorningsuccesstonightwenoticesublimtonightwelearntonightmorningsublimbackspaceenterthetonightenterwecryptofoundtheenternoticebackspacesuccesswesystemuserexamplebackspaceentersuccesstonightsublimwemorningsuccesssuccesswesublimsuccessnoticesublimfoundlearnlearnweexamplecryptonoticelearnweusershoulduserfoundcryptolearnfoundmorningtonightmorningmorningnoticewecryptowewesuccessfoundsublimweuserentershouldshouldshouldsublimbackspacetonightenterwesublimsuccessshouldfoundthethetonightwecryptoweenterfoundcryptoshouldcryptouseruserfoundentersublimsublimthelearntheshouldnoticebackspacefoundsuccessshouldtonightentermorningsystemmorningtonightwenoticelearnbackspaceexampleusershouldnoticesublimsublimexamplethesuccessnoticesystemmorningnoticecryptosystemsublimcryptosystemsuccessshouldmorningbackspaceshouldmorninglearnnoticenoticeshouldthewewesublimsublimnoticeusersuccessentersystemfoundshouldshouldcryptobackspaceusermorningsystemshouldshouldtonightwesublimuserfoundlearnbackspacethetonightmorningexampleuserthefoundbackspaceshouldtonightcryptocryptofounduserexamplenoticecryptousernoticethenoticeshouldweshouldfoundwemorningcryptosuccesslearnfoundtonightsublimnoticenoticewefoundwewesuccesssublimsublimcryptoweexampletonightsuccessfoundshouldsuccesstonightbackspacesystemshouldwesystemnoticebackspaceusersystembackspacewenoticelearnnoticenoticesuccesslearntonightuserlearnsuccessbackspacesuccesswesystemusercryptonoticethesystemusernoticewethesuccessweshouldfoundshouldcryptomorningtonightwethewesuccesslearntheshouldweexampletonightsuccessnoticenoticemorningfoundmorningfoundusersublimsystemsuccessbackspacesuccessmorninguserthefoundweexamplemorningsublimlearnfoundfoundnoticemorningshouldweuserwemorningexamplesuccesssuccessfoundthetheshouldweusershouldtheshouldexamplenoticefoundsuccesssystemfoundshouldsublimbackspacetonightshouldsystemtonightsuccesslearntonightsystemsublimsuccesscryptobackspacesystemsublimmorningmorningshouldmorninglearnsuccesslearnmorningusermorninglearnexamplecryptoshouldbackspacesublimshouldfoundbackspacesystemsystemweexamplesystemtonightsublimmorningmorninguserfoundcryptolearnbackspaceshouldbackspacenoticesublimfoundthecryptousershouldsuccesssystemsuccessshouldsystembackspacesublimshouldsublimsystembackspaceexampleshouldbackspacesublimnoticelearnsublimuserbackspaceusersublimsuccesssublimuserusernoticeshouldsuccessnoticenoticelearnexamplesystemweexamplesublimbackspacebackspacecryptoshouldusercryptosublimbackspacesublimshouldsystemnoticenoticethesuccesssuccesslearnsystemsublimwenoticelearnusersublimsystemusernoticeuserthesuccesslearnwelearnwenoticecryptolearncryptonoticenoticebackspacecryptothecryptousercryptobackspacesuccesslearnthesystemsuccessthesystemsystemcryptosuccessbackspacesublimlearnsublimcryptobackspacelearnsublimusersublimexamplecryptosublimsystemnoticecryptocryptousertheusernoticebackspacenoticenoticethecryptocryptosystembackspacesublimbackspacecryptocryptobackspacesystemuserthenoticesystemsystemsystemusernoticethecryptouserusersystemtheusercryptoexamplenoticecryptoexamplenoticetheexampleexamplethecryptotheusernoticetheexampleexamplecryptotheexampleexamplethenoticethecryptocryptoexampletheexamplecryptocryptothenoticeexamplecryptonoticetheexampleexampleexamplecryptocryptoexampleexamplethenoticethecryptothethethethethetheexampleexamplethetheexampletheexampletheexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexampleexample"#不知道为何在此处无法使用open()命令打开文本文件并阅读;
# 因此采取下策直接把文本copy过来,有大哥懂为什么吗?求教
word = ['tonight','success','notice','example','should','crypto','backspace','learn','found','morning','we','system','sublim','the','user','enter']for s in word:print(s,f.count(s))#自带的count是在太好用了,我爱python

运行结果:

/Users/yuwenao/PycharmProjects/pythonProject8/venv/bin/python /Users/yuwenao/PycharmProjects/pythonProject8/main.py
tonight 117
success 138
notice 136
example 139
should 131
crypto 141
backspace 129
learn 134
found 125
morning 113
we 124
system 130
sublim 132
the 140
user 133
enter 120进程已结束,退出代码为 0

count的用法

count()函数

描述:统计字符串里某个字符出现的次数,可以选择字符串索引的起始位置和结束位置。

语法:str.count("char", start,end) 或 str.count("char")

返回值:整型

参数说明:

str —— 要统计的字符(可以是单字符,也可以是多字符)

star —— 索引字符串的起始位置,默认参数为0

end —— 索引字符串的结束位置,默认参数为字符串长度即len(str)

似乎都是100多的数量,和4、8、11等等没有关系,是否是数量排名?

试一下,由小到大第四号:we ;第八号:should ;第11号:learn ;第15号:the;第十六号:crypto

组合一下就是:weshouldlearnthecrypto

第二题 :一张碟报

打开题目

猜测为替换密码。因此着重寻找替换规则。我们看到左边的文章似乎是易于阅读的,判定为明文,而右上角的文章看起来与左边的文章一样,但是某些东西被替换了,判断为密文,被替换的即为替换规则,然后右下角还有一条用奇奇怪怪的文字写的文本,判断为本题需要解密的密文,于是乎我们写个脚本,在比较前两篇文章得到代还规律的同时,解密右下角的文本。


str1='今天上午,朝歌区梆子公司决定,在每天三更天不亮免费在各大小区门口设卡为全城提供二次震耳欲聋的敲更提醒,' \'呼吁大家早睡早起,不要因为贪睡断送大好人生,时代的符号是前进。为此,全区老人都蹲在该公司东边树丛合力抵制,' \'不给公司人员放行,场面混乱。李罗鹰住进朝歌区五十年了,人称老鹰头,几年孙子李虎南刚从东北当猎户回来,每月还寄回来几块鼹鼠干。' \'李罗鹰当年遇到的老婆是朝歌一枝花,所以李南虎是长得非常秀气的一个汉子。李罗鹰表示:无论梆子公司做的对错,反正不能打扰他孙子睡觉,' \'子曰:‘睡觉乃人之常情’。梆子公司这是连菩萨睡觉都不放过啊。李南虎表示:梆子公司智商捉急,小心居民猴急跳墙!这三伏天都不给睡觉,这不扯淡么!' \'到了中午人群仍未离散,更有人提议要烧掉这个公司,公司高层似乎恨不得找个洞钻进去。直到治安人员出现才疏散人群归家,但是李南虎仍旧表示爷爷年纪大了,睡不好对身体不好。'str2='喵天上午,汪歌区哞叽公司决定,在每天八哇天不全免费在各大小区门脑设卡为全城提供双次震耳欲聋的敲哇提醒,' \'呼吁大家早睡早起,不要因为贪睡断送大好人生,时代的编号是前进。为此,全区眠人都足在该公司流边草丛合力抵制,' \'不给公司人员放行,场面混乱。李罗鸟住进汪歌区五十年了,人称眠鸟顶,几年孙叽李熬值刚从流北当屁户回来,每月还寄回来几块报信干。' \'李罗鸟当年遇到的眠婆是汪歌一枝花,所以李值熬是长得非常秀气的一个汉叽。李罗鸟表示:无论哞叽公司做的对错,反正不能打扰他孙叽睡觉,' \'叽叶:‘睡觉乃人之常情’。哞叽公司这是连衣服睡觉都不放过啊。李值熬表示:哞叽公司智商捉急,小心居民猴急跳墙!这八伏天都不给睡觉,这不扯淡么!'\'到了中午人群仍未离散,哇有人提议要烧掉这个公司,公司高层似乎恨不得找个洞钻进去。直到治安人员出现才疏散人群归家,但是李值熬仍旧表示爷爷年纪大了,睡不好对身体不好。'str3='喵汪哞叽双哇顶,眠鸟足屁流脑,八哇报信断流脑全叽,眠鸟进北脑上草,八枝遇孙叽,孙叽对熬编叶:值天衣服放鸟捉猴顶。鸟对:北汪罗汉伏熬乱天门。' \'合编放行,卡编扯呼。人离烧草,报信归洞,孙叽找爷爷。'ans='' #存放解出来的明文for i in range(len(str3)):for j in range(len(str2)):if str3[i] == str2[j]:ans+=str1[j]breakprint(ans)

原理很简单,运行一下得结果

/Users/yuwenao/PycharmProjects/BUUCTF-GBLaoWang/venv/bin/python /Users/yuwenao/PycharmProjects/BUUCTF-GBLaoWang/main.py
今朝梆子二更头,老鹰蹲猎东口,三更鼹鼠断东口亮子,老鹰进北口上树,三枝遇孙子,孙子对虎符曰:南天菩萨放鹰捉猴头。鹰对:北朝罗汉伏虎乱天门。合符放行,卡符扯呼。人离烧树,鼹鼠归洞,孙子找爷爷。进程已结束,退出代码为 0

第三道题:Keyboard

很有意思,一开始想不到后来手机输入法点错了,才得到解题灵感(无技术力)

都是数字,但排除数制转化。没有与26个字母顺序对应的关系。好像看不出明显的密码类型。

看回题"Keyboard",键盘?小写字母?我看着笔记本上的键盘沉默了。直到上网冲浪的时候,手机点到九宫格输入法,我才发现九宫格里数字和字母有相关性,那么6是否意味着点一次“6”键,而复数的“6”则意味着点多次呢?(九宫格通过次数决定具体字母?)我们不妨试试

得到flag='mobilephond' (一个一个看)

2022-5-15 密码学刷题分享(第二部分)相关推荐

  1. Bugku CTF 密码学刷题

    Bugku CTF 密码学刷题 前言 一.抄错的字符 二./.- 三.聪明的小羊 四.ok 五.[+-<>] 六.把猪困在猪圈里 七.你喜欢下棋吗 八.小山丘的秘密 九.EN-气泡 十.你 ...

  2. 2022年CPA财务成本管理-资产定价专题(Asset Pricing)【3月22开始15天15考点刷题】【完结】

    这个名字迷惑性太强,展开来说是Corporate Finance(Asset Pricing, Corporate Goverance)和成本计算.管理会计✅3门课. 鸣谢对啊网.第二章财务比率我这5 ...

  3. 2022年暑期CTF刷题WP(停止更新)

    目录 攻防世界 MISC simple_transfer Reverse simple-unpack logmein getit Bugku MISC 社工-进阶收集 这篇博客用来记录我(一个菜鸡)2 ...

  4. LeetCode刷题(176).第二高的薪水

    编写一个 SQL 查询,获取 Employee 表中第二高的薪水(Salary) . +----+--------+ | Id | Salary | +----+--------+ | 1  | 10 ...

  5. python刷题+leetcode(第二部分)

    100. 简化路径 思路:栈 class Solution:def simplifyPath(self, path: str) -> str:stack = []for path_ in pat ...

  6. 2022.10.14每日刷题打卡

    リモコン 题意: 题目描述: 高桥君要调整空调的设定温度.现在的设定温度是A度,而他想调到B度. 空调遥控器按一次可以: 上调或下调1度 上调或下调5度 上调或下调10度 高桥君想求出从A调到B度的最 ...

  7. 2022.11.14每日刷题打卡

    过山车 原题链接:传送门 二分图最大匹配模板题,但sb了数组开小了一直TLE,虽然是模板但很长教训. #include <bits/stdc++.h> using namespace st ...

  8. 2022.3.14密码学基础题【网络攻防CTF】(保姆级图文)

    目录 解码软件工具下载(2022.5.13) 1. 埃特巴什密码 `flaghahactfisnice` 2. 疑惑的汉字,当铺密码 `CTF{RM}` 3. 莫斯密码 flag 4. 培根密码 fl ...

  9. C/C++编程刷题分享—常见的经典面试题一

    ✅作者简介:嵌入式领域新星创作者,博客专家 ✨个人主页:咸鱼弟

最新文章

  1. POJ 1552 Doubles (C++ STL set使用)
  2. python单片机自动浇花_[MicroPython]TPYBoardv102自动浇花系统
  3. 11道Python最基本的面试题
  4. DeepLearning.AI第一部分第三周、 浅层神经网络(Shallow neural networks)
  5. JSP1.0\JSP2.0 区别
  6. 测试用例优先级划分_全面的质量保障体系之测试用例分级
  7. 使用SoapUI调用安全WCF SOAP服务–第1部分,该服务
  8. telegraf输出MySQL_Grafana+influxdb+telegraf初探-快速监控主机与mysql
  9. ChaiNext:大盘横盘,主流币未有突出表现
  10. java 通用类型_Java获取通用类型的集合
  11. linux修改jdk文件保存,Linux下更换jdk和配置环境变量详解
  12. U-boot主循环main_loop分析
  13. 图像中有关位图、色位图、以及所占字节数
  14. Redhat 安装Informix 12.10
  15. NIOSII 安装问题汇总
  16. Android——Intent简介
  17. Navicat 恢复mysql psc 备份文件
  18. ofstream错误:error: variable ‘std::ofstream ofs’ has initializer but incomplete type
  19. 华为云弹性文件服务 SFS
  20. python动物书_图灵出品的人气O'Reilly动物书,你更钟意哪本?

热门文章

  1. 误删桌面上的 计算机 图片,桌面图标删除不了怎么办 桌面图片不见找回【图文】...
  2. JQuery制作3D导航栏切换动画
  3. 【Basic Use Case】
  4. 【数学一本通 第一章】SEJ-Strongbox [LUOGU] [POI2011]
  5. android 关闭按键灯,安卓永久关闭键盘灯的方法
  6. mac按键难回弹(按下去软软的)
  7. Fragment的基本用法
  8. 总结!一个产品新手的踩坑记
  9. E-Lin通用微服务平台介绍及性能比较
  10. Chainge橙子钱包跨链技术介绍