> For the complete documentation index, see [llms.txt](https://hacktricks.xsx.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacktricks.xsx.tw/pentesting-web/xss-cross-site-scripting/sniff-leak.md).

# Sniff Leak

<details>

<summary><strong>从零开始学习AWS黑客技术，成为专家</strong> <a href="https://training.hacktricks.xyz/courses/arte"><strong>htARTE（HackTricks AWS红队专家）</strong></a><strong>！</strong></summary>

支持HackTricks的其他方式：

* 如果您想看到您的**公司在HackTricks中做广告**或**下载PDF格式的HackTricks**，请查看[**订阅计划**](https://github.com/sponsors/carlospolop)!
* 获取[**官方PEASS & HackTricks周边产品**](https://peass.creator-spring.com)
* 探索[**PEASS家族**](https://opensea.io/collection/the-peass-family)，我们的独家[**NFTs**](https://opensea.io/collection/the-peass-family)
* **加入** 💬 [**Discord群**](https://discord.gg/hRep4RUj7f) 或 [**电报群**](https://t.me/peass) 或在**Twitter**上关注我们 🐦 [**@carlospolopm**](https://twitter.com/hacktricks_live)**。**
* 通过向[**HackTricks**](https://github.com/carlospolop/hacktricks)和[**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github仓库提交PR来分享您的黑客技巧。

</details>

## 将脚本内容转换为UTF16来泄漏

[**这篇文章**](https://blog.huli.tw/2022/08/01/en/uiuctf-2022-writeup/#modernism21-solves)泄漏了一个text/plain，因为没有`X-Content-Type-Options: nosniff`头部，通过添加一些初始字符，使javascript认为内容是UTF-16编码，从而脚本不会中断。

## 将脚本内容视为ICO来泄漏

[**下一篇文章**](https://blog.huli.tw/2022/08/01/en/uiuctf-2022-writeup/#precisionism3-solves)通过将脚本内容加载为ICO图像，访问`width`参数来泄漏脚本内容。
