How can I see the source code of this website www.samy.pl?

This website (www.samy.pl) uses some technique so that no one can check the code
( Ctrl+ Shift+ I) or view the source ( Ctrl+ U). It may detect that you have opened a console or inspector, the code automatically changes.

How is this possible?

+6
source share
8 answers

You can always save the site. In chrome, open the menu → more tools → Save page as ..

You should be able to run the html file in chrome and use Dev Tools without blocking it.

+3
source

console "" API, .

, , :

-, , Google Chrome DevTools , /. "" :

  • a chrome.devtools.inspectedWindow.eval API DevTools
  • document.body.innerHTML divy-face div
  • , setInterval, console.clear() console.log() " ".

EventListeners Chrome DevTools, " ".

, , , , :

  • false
  • .

,

+3

hahaha, , samy!

, , ( , )

1. , " ! № 7".

2. , № 2:

view-source:https://samy.pl

:

/*
No source for you! Easter egg #2
*// AFTER SOME LONG WHITE SPACES HERE  /.source.replace(/.{7}/g,function(w){document.write(String.fromCharCode(parseInt(w.replace(/ /g,'0').replace(/   /g,'1'),2)))});

( js), 1 0 char , , : D

https://de.wikipedia.org/wiki/Whitespace_(Programmiersprache)

js, , .

enter image description here

. , normaly F12 javascript.

!

+2

! .
1. Firefox ( Chrome ).
2. URL javascript:alert(document.documentElement.outerHTML);
3. Enter.
4. Voil & agrave;!

+1

index.html -, <iframe src='https://samy.pl/'>. , devtools. iframe.

+1

Update: view-source: http://samy.pl, , . , Chrome.

, . .

0

, .

Chrome devtools . Chrome ( ).

, .

0

. F12, .

-1

Source: https://habr.com/ru/post/1016512/


All Articles