Skip to content

Commit 7e62ad1

Browse files
authored
Merge pull request #343 from astropsy999/master
The clickjacking attack
2 parents 557224b + 4e193b5 commit 7e62ad1

File tree

18 files changed

+385
-384
lines changed

18 files changed

+385
-384
lines changed

3-frames-and-windows/06-clickjacking/article.md

Lines changed: 75 additions & 75 deletions
Large diffs are not rendered by default.

3-frames-and-windows/06-clickjacking/clickjacking-visible.view/facebook.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<body style="margin:10px;padding:10px">
55

6-
<input type="button" onclick="alert('Like pressed on facebook.html!')" value="I LIKE IT !">
6+
<input type="button" onclick="alert('Лайк натиснуто на facebook.html!')" value="I LIKE IT !">
77

88
</body>
99

3-frames-and-windows/06-clickjacking/clickjacking-visible.view/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
}
2020
</style>
2121

22-
<div>Click to get rich now:</div>
22+
<div>Натисніть, щоб розбагатіти:</div>
2323

24-
<!-- The url from the victim site -->
24+
<!-- URL-адреса з сайту-жертви -->
2525
<iframe src="facebook.html"></iframe>
2626

27-
<button>Click here!</button>
27+
<button>Натисніть тут!</button>
2828

29-
<div>...And you're cool (I'm a cool hacker actually)!</div>
29+
<div>...І ти крутий (насправді я крутий хакер)!</div>
3030

3131
</body>
3232
</html>

3-frames-and-windows/06-clickjacking/clickjacking.view/facebook.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<body style="margin:10px;padding:10px">
55

6-
<input type="button" onclick="alert('Like pressed on facebook.html!')" value="I LIKE IT !">
6+
<input type="button" onclick="alert('Лайк натиснуто на facebook.html!')" value="I LIKE IT !">
77

88
</body>
99

3-frames-and-windows/06-clickjacking/clickjacking.view/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
}
2020
</style>
2121

22-
<div>Click to get rich now:</div>
22+
<div>Натисніть, щоб розбагатіти:</div>
2323

24-
<!-- The url from the victim site -->
24+
<!-- URL-адреса з сайту-жертви -->
2525
<iframe src="facebook.html"></iframe>
2626

27-
<button>Click here!</button>
27+
<button>Натисніть тут!</button>
2828

29-
<div>...And you're cool (I'm a cool hacker actually)!</div>
29+
<div>...І ти крутий (насправді я крутий хакер)!</div>
3030

3131
</body>
3232
</html>

3-frames-and-windows/06-clickjacking/protector.view/iframe.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<body>
2121

2222
<div id="protector">
23-
<a href="/" target="_blank">Go to the site</a>
23+
<a href="/" target="_blank">Перейти на сайт</a>
2424
</div>
2525

2626
<script>
@@ -31,11 +31,11 @@
3131

3232
</script>
3333

34-
This text is always visible.
34+
Цей текст завжди видно.
3535

36-
But if the page was open inside a document from another domain, the div over it would prevent any actions.
36+
Але якщо сторінка була відкрита всередині документа з іншого домену, div над нею завадить будь-яким діям.
3737

38-
<button onclick="alert(1)">Click wouldn't work in that case</button>
38+
<button onclick="alert(1)">Клік у даному випадку не спрацює</button>
3939

4040
</body>
4141
</html>

3-frames-and-windows/06-clickjacking/top-location.view/iframe.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<body>
99

10-
<div>Changes top.location to javascript.info</div>
10+
<div>Змінює top.location на javascript.info</div>
1111

1212
<script>
1313
top.location = 'https://javascript.info';

3-frames-and-windows/06-clickjacking/top-location.view/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
window.onbeforeunload = function() {
2323
window.onbeforeunload = null;
24-
return "Want to leave without learning all the secrets (he-he)?";
24+
return "Хочете піти, не дізнавшись усіх секретів (хе-хе)?";
2525
};
2626

2727
document.body.insertAdjacentHTML('beforeend', '<iframe src="iframe.html">');
@@ -31,11 +31,11 @@
3131

3232
<body>
3333

34-
<p>After a click on the button the visitor gets a "strange" question about whether they want to leave.</p>
34+
<p>Після натискання на кнопку відвідувач отримує "дивне" запитання про те, чи хоче він піти.</p>
3535

36-
<p>Probably they would respond "No", and the iframe protection is hacked.</p>
36+
<p>Ймовірно, він відповів би "ні", а захист iframe зламано.</p>
3737

38-
<button onclick="attack()">Add a "protected" iframe</button>
38+
<button onclick="attack()">Додайте "захищений" iframe</button>
3939

4040
</body>
4141
</html>

5-network/12-server-sent-events/article.md

Lines changed: 112 additions & 112 deletions
Large diffs are not rendered by default.

5-network/12-server-sent-events/eventsource.view/index.html

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,38 @@
22
<script>
33
let eventSource;
44

5-
function start() { // when "Start" button pressed
5+
function start() { // коли кнопку "Пуск" натиснуто
66
if (!window.EventSource) {
7-
// IE or an old browser
8-
alert("The browser doesn't support EventSource.");
7+
// для IE чи іншого старого браузера
8+
alert("Браузер не підтримує EventSource.");
99
return;
1010
}
1111

1212
eventSource = new EventSource('digits');
1313

1414
eventSource.onopen = function(e) {
15-
log("Event: open");
15+
log("Подія: open");
1616
};
1717

1818
eventSource.onerror = function(e) {
19-
log("Event: error");
19+
log("Подія: error");
2020
if (this.readyState == EventSource.CONNECTING) {
21-
log(`Reconnecting (readyState=${this.readyState})...`);
21+
log(`Повторне з’єднання (readyState=${this.readyState})...`);
2222
} else {
23-
log("Error has occured.");
23+
log("Сталася помилка.");
2424
}
2525
};
2626

2727
eventSource.addEventListener('bye', function(e) {
28-
log("Event: bye, data: " + e.data);
28+
log("Подія: bye, дані: " + e.data);
2929
});
3030

3131
eventSource.onmessage = function(e) {
32-
log("Event: message, data: " + e.data);
32+
log("Подія: message, дані: " + e.data);
3333
};
3434
}
3535

36-
function stop() { // when "Stop" button pressed
36+
function stop() { // коли кнопку "Стоп" натиснуто
3737
eventSource.close();
3838
log("eventSource.close()");
3939
}
@@ -44,7 +44,7 @@
4444
}
4545
</script>
4646

47-
<button onclick="start()">Start</button> Press the "Start" to begin.
47+
<button onclick="start()">Пуск</button> Натісніть "Пуск" для початку.
4848
<div id="logElem" style="margin: 6px 0"></div>
4949

50-
<button onclick="stop()">Stop</button> "Stop" to finish.
50+
<button onclick="stop()">Стоп</button> "Стоп" для зупинки.

0 commit comments

Comments
 (0)