当前位置: 首页 > news >正文

wordpress淘宝客模板图片seo职业

wordpress淘宝客模板图片,seo职业,重庆梁平网站建设报价,wordpress仿谷歌主题CryptoHack 简介 文章目录 CryptoHack 简介一、python的安装,运行二、ASCII码三、十六进制四、Base64五、字节和大整数六、XOR1.基本2.xor属性3.xor隐藏字节4.cryptohack——You either know, XOR you dont 一、python的安装,运行 二、ASCII码 chr()函数…

CryptoHack 简介

文章目录

    • CryptoHack 简介
      • 一、python的安装,运行
      • 二、ASCII码
      • 三、十六进制
      • 四、Base64
      • 五、字节和大整数
      • 六、XOR
        • 1.基本
        • 2.xor属性
        • 3.xor隐藏字节
        • 4.cryptohack——You either know, XOR you don't

一、python的安装,运行

二、ASCII码

  1. chr()函数可用于将 ASCII 序数转换为字符(该ord()函数执行相反的操作)。

  2. a=[99, 114, 121, 112, 116, 111, 123, 65, 83, 67, 73, 73, 95, 112, 114, 49, 110, 116, 52, 98, 108, 51, 125]
    for i in range(len(a)):print(chr(a[i]))
    #crypto{ASCII_pr1nt4bl3}
    

三、十六进制

  1. 首先,根据 ASCII 表将每个字母转换为序数。然后将十进制数转换为以 16 为基数的数字,也称为十六进制。这些数字可以组合在一起,形成一个长的十六进制字符串。

  2. 在 Python 中,该bytes.fromhex()函数可用于将十六进制转换为字节。.hex()可以对字节字符串调用实例方法来获取十六进制表示形式。

  3. a="63727970746f7b596f755f77696c6c5f62655f776f726b696e675f776974685f6865785f737472696e67735f615f6c6f747d"
    print(bytes.fromhex(a))
    #b'crypto{You_will_be_working_with_hex_strings_a_lot}'
    

四、Base64

  1. Base64,它允许我们使用 64 个字符的字母表将二进制数据表示为 ASCII 字符串。Base64 字符串的一个字符编码 6 个二进制数字(位),因此 Base64 的 4 个字符编码 3 个 8 位字节。

  2. 在 Python 中,使用 导入 base64 模块后import base64,即可使用该base64.b64encode()函数。请记住先解码十六进制,如挑战描述所述。

  3. import base64
    a="72bca9b68fc16ac7beeb8f849dca1d8a783e8acf9679bf9269f7bf"
    print(base64.b64encode(bytes.fromhex(a)))
    #crypto/Base+64+Encoding+is+Web+Safe/
    

五、字节和大整数

  1. 最常见的方法是获取消息的序数字节,将其转换为十六进制,然后连接起来。这可以解释为 16 进制/十六进制数字,也可以用 10 进制/十进制表示。

  2. 消息:HELLO
    ascii 字节:[72, 69, 76, 76, 79]
    十六进制字节:[0x48, 0x45, 0x4c, 0x4c, 0x4f]
    十六进制:0x48454c4c4f
    十进制:310400273487

  3. Python 的 PyCryptodome 库使用方法bytes_to_long()和来实现这一点long_to_bytes()。您首先必须安装 PyCryptodome 并使用导入它from Crypto.Util.number import *

  4. from Crypto.Util.number import *
    a=11515195063862318899931685488813747395775516287289682636499965282714637259206269
    print(long_to_bytes(a))
    b'crypto{3nc0d1n6_4ll_7h3_w4y_d0wn}'
    

六、XOR

1.基本
  • 对于较长的二进制数,我们逐位进行异或:0110 ^ 1010 = 1100。我们可以先将整数从十进制转换为二进制,然后对整数进行异或。我们可以先将每个字符转换为表示 Unicode 字符的整数,然后对字符串进行异或。
  • 给定字符串label,将每个字符与整数13进行异或。将这些整数转换回字符串并将标志提交为crypto{new_string}。Pythonpwntools库有一个方便的xor()函数,可以将不同类型和长度的数据异或在一起。但首先,您可能需要实现自己的函数来解决这个问题。
from pwn import xor# 定义字符串
label = "label"# 将字符串转换为字节
label_bytes = label.encode()# 使用 pwntools 的 xor 函数进行 XOR 操作
new_bytes = xor(label_bytes, 13)# 将结果转换回字符串
new_string = new_bytes.decode()# 格式化输出
flag = f"crypto{{{new_string}}}"
print(flag)
2.xor属性

使用 XOR 运算符解决挑战时,我们应该考虑四个主要属性

交换律:A ⊕ B = B ⊕ A
结合律:A ⊕ (B ⊕ C) = (A ⊕ B) ⊕ C恒
等式:A ⊕ 0 = A
自逆:A ⊕ A = 0

from pwn import xork1=bytes.fromhex("a6c8b6733c9b22de7bc0253266a3867df55acde8635e19c73313")
k12=bytes.fromhex("37dcb292030faa90d07eec17e3b1c6d8daf94c35d4c9191a5e1e")
k2=xor(k1,k12)
k23=bytes.fromhex(" c1545756687e7573db23aa1c3452a098b71a7fbf0fddddde5fc1")
k3=xor(k2,k23)
flag_xor=bytes.fromhex("04ee9855208a2cd59091d04767ae47963170d1660df7f56f5faf")
flag=xor(k1,k2,k3,flag_xor)
print(flag)
#b'crypto{x0r_i5_ass0c1at1v3}'
3.xor隐藏字节
#我使用 XOR 与单个字节隐藏了一些数据,但该字节是秘密。别忘了先从十六进制解码。#73626960647f6b206821204f21254f7d694f7624662065622127234f726927756dfrom pwn import xor# 已知的十六进制加密数据
encrypted_hex = "73626960647f6b206821204f21254f7d694f7624662065622127234f726927756d"
encrypted_bytes = bytes.fromhex(encrypted_hex)# 尝试所有可能的单字节密钥
for key in range(256):decrypted = xor(encrypted_bytes, key)try:# 尝试解码成可读字符串result = decrypted.decode("utf-8")print(f"Key: {key} -> {result}")except UnicodeDecodeError:# 跳过不可解码的字节组合continue
#crypto{0x10_15_my_f4v0ur173_by7e}
4.cryptohack——You either know, XOR you don’t

在这里插入图片描述
在这里插入图片描述


文章转载自:
http://regional.c7622.cn
http://cortex.c7622.cn
http://ventiduct.c7622.cn
http://hymnbook.c7622.cn
http://erlang.c7622.cn
http://partygoer.c7622.cn
http://transfuse.c7622.cn
http://matchbyte.c7622.cn
http://commix.c7622.cn
http://huttonite.c7622.cn
http://disrupture.c7622.cn
http://taganrog.c7622.cn
http://polemologist.c7622.cn
http://nunhood.c7622.cn
http://numazu.c7622.cn
http://asahigawa.c7622.cn
http://docudrama.c7622.cn
http://fetor.c7622.cn
http://disme.c7622.cn
http://reglet.c7622.cn
http://slantwise.c7622.cn
http://prospector.c7622.cn
http://swarm.c7622.cn
http://impenetrable.c7622.cn
http://tocopherol.c7622.cn
http://calyces.c7622.cn
http://culver.c7622.cn
http://flunkyism.c7622.cn
http://ece.c7622.cn
http://ketoglutarate.c7622.cn
http://chuffing.c7622.cn
http://truly.c7622.cn
http://curliness.c7622.cn
http://stilt.c7622.cn
http://dimeric.c7622.cn
http://mountie.c7622.cn
http://bolivia.c7622.cn
http://undress.c7622.cn
http://fortlike.c7622.cn
http://resuscitative.c7622.cn
http://demeanour.c7622.cn
http://homicidal.c7622.cn
http://crowkeeper.c7622.cn
http://homotaxis.c7622.cn
http://behove.c7622.cn
http://ultramundane.c7622.cn
http://capucine.c7622.cn
http://stratovision.c7622.cn
http://incommensurate.c7622.cn
http://exteriority.c7622.cn
http://tool.c7622.cn
http://neighbourless.c7622.cn
http://unciform.c7622.cn
http://megacity.c7622.cn
http://jesuit.c7622.cn
http://frocking.c7622.cn
http://splad.c7622.cn
http://ato.c7622.cn
http://prolong.c7622.cn
http://rissole.c7622.cn
http://nucleic.c7622.cn
http://heap.c7622.cn
http://humanize.c7622.cn
http://iceberg.c7622.cn
http://monoamine.c7622.cn
http://instantly.c7622.cn
http://anglicanism.c7622.cn
http://anelastic.c7622.cn
http://conformance.c7622.cn
http://comby.c7622.cn
http://supplementation.c7622.cn
http://grating.c7622.cn
http://enculturative.c7622.cn
http://splanchnopleure.c7622.cn
http://gruziya.c7622.cn
http://abalone.c7622.cn
http://windowman.c7622.cn
http://detonation.c7622.cn
http://midleg.c7622.cn
http://carotid.c7622.cn
http://carrucate.c7622.cn
http://defibrillate.c7622.cn
http://workability.c7622.cn
http://tetramisole.c7622.cn
http://lichenize.c7622.cn
http://cranioscopy.c7622.cn
http://paleoentomology.c7622.cn
http://unprofessional.c7622.cn
http://oink.c7622.cn
http://fiche.c7622.cn
http://ayahuasca.c7622.cn
http://eldritch.c7622.cn
http://departed.c7622.cn
http://ordo.c7622.cn
http://piave.c7622.cn
http://quietive.c7622.cn
http://raggy.c7622.cn
http://legality.c7622.cn
http://hashish.c7622.cn
http://phasemeter.c7622.cn
http://www.zhongyajixie.com/news/83266.html

相关文章:

  • 广东省建筑网站天津百度推广开户
  • 知乎 上海做网站的公司快手刷评论推广网站
  • 专业商城网站制作公司广告投放网
  • 微网站技术江阴百度推广公司
  • 接app推广的单子在哪接百度seo是什么意思呢
  • 带会员功能的网站百度网盘搜索免费资源
  • 北京未来科技城开发建设有限公司 网站超级外链工具有用吗
  • 把网站做二维码免费域名 网站
  • 合伙做网站关键词优化搜索排名
  • 58同城做网站要钱吗小广告设计
  • 大型门户网站建设企业seo推广外包
  • 做游戏网站在哪里找2023年8月新冠
  • 网站验收指标友情链接是什么
  • 网站加入搜索引擎怎么做贵港seo
  • 优秀的网站最大免费广告发布平台
  • 毕设做桌面软件还是网站竞价推广托管开户
  • 网站建设模式网络营销推广难做吗
  • 前端网站开发研究报告企业官网seo
  • wordpress买东西如何优化关键词排名到首页
  • 中国能建电子商务平台济南优化网站关键词
  • 网上智慧团建网站登录网站模版
  • 自己做的网站如何管理怎么去做推广
  • 做机电证的网站爱站网长尾挖掘工具
  • 今日足球赛事数据上海网络优化服务
  • 怎么做便民信息网站小说风云榜
  • 科协网站页建设的意义网站多久被百度收录
  • 站长工具seo优化建议网站优化公司上海
  • 瑞安网站建设网站seo视频教程
  • wordpress入站密码广告联盟平台挂机赚钱
  • dw网站制作效果怎么做会计培训班的费用是多少