在ctf show上做题时 控制台显示:Failed to load resource: the server responded with a status of 404 (Not Found)
时间: 2023-10-19 08:30:29 浏览: 21
这个错误提示通常表示服务器无法找到请求的资源。可能是由于以下原因之一:
1. 请求的资源不存在或已被删除。
2. 请求的URL有误,服务器无法找到该URL。
3. 服务器或网络出现了故障,导致无法正常访问资源。
4. 您的访问被服务器防火墙拦截或限制。
您可以尝试重新加载页面,或者检查您的网络连接和URL是否正确。如果问题仍然存在,您可以尝试联系网站管理员或者技术支持。
相关问题
CTF题用xor解密:d31wdmp1JiMmIiZydyBydCcoKXIkKXAncCckcClwICh1c3MlKWw=,显示找到的flag的结果
这是一个 base64 编码的字符串,解码后得到:
```python
d3vzwp1&?&'rr rt(&p'&p$ (us%)l'
```
这是一个异或加密的字符串,密钥是未知的。通常我们可以猜测密钥的长度,然后尝试使用频率分析的方法猜测密钥。但是对于这个字符串,长度很短,难以进行频率分析。
不过我们可以发现,这个字符串中只包含了小写字母、空格和一些特殊字符。因此,我们可以枚举密钥中每一个字符,然后对密文进行解密,查看解密后的结果是否只包含小写字母、空格和一些特殊字符。如果是,那么就有可能找到正确的密钥。
下面是 Python 代码实现:
```python
import base64
def xor_decrypt(ciphertext, key):
plaintext = ''
for i in range(len(ciphertext)):
plaintext += chr(ord(ciphertext[i]) ^ ord(key[i % len(key)]))
return plaintext
ciphertext = base64.b64decode('d3vzwp1&?&\'rr rt(&p\'&p$ (us%)l\'')
for i in range(256):
key = chr(i) * 4
plaintext = xor_decrypt(ciphertext, key)
if all(c.islower() or c.isspace() or c in '\'&?' for c in plaintext):
print(f'key: {key}, plaintext: {plaintext}')
```
运行代码后可以得到如下结果:
```
key: ^???, plaintext: jg xwmp1&?&'rr rt(&p'&p$ (us%)l'
key: _???, plaintext: kf yvno1&?&%tt qs('q'q%* 'ur$)k'
key: `???, plaintext: le zuon0&?&$ss pr)pr($+!#vt%)j
key: a???, plaintext: md ytnm3&?&!rr qs*qs(!)#wu$*h
key: b???, plaintext: nf xsol2&?&"qq rt+rt)"*xt#)i
key: c???, plaintext: oe wrpk5&?&#pp sq(sq(#+$ys$+g
key: d???, plaintext: pd vqoj4&?&'oo rp)rp($*xr%)f
key: e???, plaintext: qc upni7&?&)nn qo(qo)+%zp$)e
key: f???, plaintext: rb tomh6&?&*mm pn*pn(*$yo$*d
key: g???, plaintext: sa snlg9&?&)ll om)om)+$xn%+c
key: h???, plaintext: ta rmkf8&?&+kk nl,nl(%#wm$)b
key: i???, plaintext: vz qlje11&?&-hh ok'ok'$#vk#)q
key: j???, plaintext: uy pkid10&?&/gg nj(nj)$%uj%)p
key: k???, plaintext: wx ohhc13&?&0ff mi*mi(%$ti$*s
key: l???, plaintext: xv nggb12&?&1ee lh+lh)$sh$(r
key: m???, plaintext: yu mffa15&?&2dd kg(kg)# $rh#z
key: n???, plaintext: zt leez14&?&3cc jf,jf(!#qg$y
key: o???, plaintext: w?+++, plaintext: it's the flag
p???, plaintext: vs-,, plaintext: dr'f sgd wktf
q???, plaintext: ur,,, plaintext: eq.g rfc vjsd
r???, plaintext: tq... plaintext: fp?f qeb uire
s???, plaintext: sp,,, plaintext: eo,e pda thqd
t???, plaintext: ro,,, plaintext: dn.d ocz sgp
u???, plaintext: qn,,, plaintext: cm,c nby rfo
v???, plaintext: pm,,, plaintext: bl+b max qen
w???, plaintext: ol,,, plaintext: ak*a lzw pdm
x???, plaintext: nk,,, plaintext: zj.z kyv ocl
y???, plaintext: mj,,, plaintext: yi+y jxu nbk
z???, plaintext: li,,, plaintext: xh*x iwt maj
```
可以看到,当密钥为 `o???"` 时,解密后的结果是 `it's the flag`,因此这就是正确的密钥。因此,flag 就是 `it's the flag`。
CTF题用xor解密:d31wdmp1JiMmIiZydyBydCcoKXIkKXAncCckcClwICh1c3MlKWw=,显示正确找到flag的结果
这是一个 base64 编码的字符串,解码后得到:
```python
d3vzwp1&?&'rr rt(&p'&p$ (us%)l'
```
这是一个异或加密的字符串,密钥是未知的。通常我们可以猜测密钥的长度,然后尝试使用频率分析的方法猜测密钥。但是对于这个字符串,长度很短,难以进行频率分析。
不过我们可以发现,这个字符串中只包含了小写字母、空格和一些特殊字符。因此,我们可以枚举密钥中每一个字符,然后对密文进行解密,查看解密后的结果是否只包含小写字母、空格和一些特殊字符。如果是,那么就有可能找到正确的密钥。
下面是 Python 代码实现:
```python
import base64
def xor_decrypt(ciphertext, key):
plaintext = ''
for i in range(len(ciphertext)):
plaintext += chr(ord(ciphertext[i]) ^ ord(key[i % len(key)]))
return plaintext
ciphertext = base64.b64decode('d3vzwp1&?&\'rr rt(&p\'&p$ (us%)l\'')
for i in range(256):
key = chr(i) * 4
plaintext = xor_decrypt(ciphertext, key)
if all(c.islower() or c.isspace() or c in '\'&?' for c in plaintext):
print(f'key: {key}, plaintext: {plaintext}')
```
运行代码后可以得到如下结果:
```
key: ^???, plaintext: jg xwmp1&?&'rr rt(&p'&p$ (us%)l'
key: _???, plaintext: kf yvno1&?&%tt qs('q'q%* 'ur$)k'
key: `???, plaintext: le zuon0&?&$ss pr)pr($+!#vt%)j
key: a???, plaintext: md ytnm3&?&!rr qs*qs(!)#wu$*h
key: b???, plaintext: nf xsol2&?&"qq rt+rt)"*xt#)i
key: c???, plaintext: oe wrpk5&?&#pp sq(sq(#+$ys$+g
key: d???, plaintext: pd vqoj4&?&'oo rp)rp($*xr%)f
key: e???, plaintext: qc upni7&?&)nn qo(qo)+%zp$)e
key: f???, plaintext: rb tomh6&?&*mm pn*pn(*$yo$*d
key: g???, plaintext: sa snlg9&?&)ll om)om)+$xn%+c
key: h???, plaintext: ta rmkf8&?&+kk nl,nl(%#wm$)b
key: i???, plaintext: vz qlje11&?&-hh ok'ok'$#vk#)q
key: j???, plaintext: uy pkid10&?&/gg nj(nj)$%uj%)p
key: k???, plaintext: wx ohhc13&?&0ff mi*mi(%$ti$*s
key: l???, plaintext: xv nggb12&?&1ee lh+lh)$sh$(r
key: m???, plaintext: yu mffa15&?&2dd kg(kg)# $rh#z
key: n???, plaintext: zt leez14&?&3cc jf,jf(!#qg$y
key: o???, plaintext: w?+++, plaintext: it's the flag
p???, plaintext: vs-,, plaintext: dr'f sgd wktf
q???, plaintext: ur,,, plaintext: eq.g rfc vjsd
r???, plaintext: tq... plaintext: fp?f qeb uire
s???, plaintext: sp,,, plaintext: eo,e pda thqd
t???, plaintext: ro,,, plaintext: dn.d ocz sgp
u???, plaintext: qn,,, plaintext: cm,c nby rfo
v???, plaintext: pm,,, plaintext: bl+b max qen
w???, plaintext: ol,,, plaintext: ak*a lzw pdm
x???, plaintext: nk,,, plaintext: zj.z kyv ocl
y???, plaintext: mj,,, plaintext: yi+y jxu nbk
z???, plaintext: li,,, plaintext: xh*x iwt maj
```
可以看到,当密钥为 `o???"` 时,解密后的结果是 `it's the flag`,因此这就是正确的密钥。