> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/zh/web-vulnerabilities/sql-truncation-attack/sql-truncation-registration-pentesting-web.md).

# SQL 截断注册

## SQL 截断：

这是 **电子邮件地址列表** 我们应该尝试访问：

<figure><img src="/files/d1e9d8cc5eaed862e0717150a4425c6d5077d619" alt=""><figcaption></figcaption></figure>

在注册面板中，如果我们尝试 **插入** 一个电子邮件地址，这表明该用户已存在：

<figure><img src="/files/ab633e345aa7910c2f47b3c795ca49971d745682" alt=""><figcaption></figcaption></figure>

我们在 HTML 代码中看到 **数据库** 将字符数限制为 13：

<figure><img src="/files/ad2fe4c1badf60aa870649b463ecda5c6858c537" alt=""><figcaption></figcaption></figure>

我们输入带有空格和一个额外字符的电子邮件地址，同时也修改 **maxlength** HTML 代码中的值为更大的数，以允许我们输入：

<figure><img src="/files/58e22761df78c8cb59fe2e077cd762a18291b85e" alt=""><figcaption></figcaption></figure>

我们成功 **注册** 使用用户名 Jacob，因为发生的情况是，电子邮件已被 **截断**。这就是我们所说的字符串末尾空格截断，即自动删除这些空格。

<figure><img src="/files/93347ae662dabeccf11133636b9ccf0019043257" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hacking-notes.jord4n.pro/zh/web-vulnerabilities/sql-truncation-attack/sql-truncation-registration-pentesting-web.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
