Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,890 members, 7,806,581 topics. Date: Tuesday, 23 April 2024 at 06:37 PM

Challenge! You Cant View This Page Source Code! - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Challenge! You Cant View This Page Source Code! (1217 Views)

Online Banking Source Code In PHP, MSQL / Need Step On How To Hide Javascript Source Code. / [source Code] A Program That Solves A Transportation Problem - By Frank UMEADI (2) (3) (4)

(1) (Reply) (Go Down)

Challenge! You Cant View This Page Source Code! by uvalued(m): 9:30am On Jun 08, 2015
Greetings, i was surfing and doing some javascript search and i came across a post that shows how a page deny you accessing the "view source" option on the context menu and after some seconds it self destruct.

i was wondering how did the developer grayed out the "view source" option under the right click context menu?


This is the link.

http://devrijehuisarts.org/test/noViewSource.asp

Re: Challenge! You Cant View This Page Source Code! by fattbabakay(m): 10:30am On Jun 08, 2015
Just google "How to hide my website's source page" ...You should get a means.

1 Like

Re: Challenge! You Cant View This Page Source Code! by uvalued(m): 1:30pm On Jun 08, 2015
fattbabakay:
Just google "How to hide my website's source page" ...You should get a means.

Thanks! I have googled it but most comments were its not POSSIBLE. And this link shows that its possible!
Re: Challenge! You Cant View This Page Source Code! by Craigston: 4:03pm On Jun 08, 2015
<html><head><link rel="stylesheet"
media="screen,projection,tv,handheld"
href="opera:style/image.css"><style media
="(max-width:816px),(max-height:516px)
"> body.contain {position: absolute;margin:
0;top: 0;left: 0;bottom: 0;right: 0;}
body.contain > img {width: 100%;height:
100%;-o-object-fit: contain;cursor: zoom-in;}
body.zoom > img {cursor: zoom-out;} </
style><link rel="icon"
href=""><title> noViewSource.asp (800×500)
</title></head><body
class="contain"><img
onerror="this.error=true" src=""><script>
(function() {if (window.donotrun)return;var
img = document.querySelector('img')
;document.title =
window.location.pathname.match(/([^\/]*)
\/*$/)[1];var zoomX;var zoomY;function
zoomIn() {document.body.className =
'zoom';window.scrollTo(zoomX +
img.offsetLeft -
window.innerWidth/2,zoomY +
img.offsetTop - window.innerHeight/2);}
function zoomOut() {zoomX =
window.scrollX + window.innerWidth/2 -
img.offsetLeft;zoomY = window.scrollY +
window.innerHeight/2 -
img.offsetTop;document.body.className =
'contain';}var interval = setInterval(function
() {if (img.naturalWidth &&
img.naturalHeight) {clearInterval(interval)
;document.title += ' ('+img.naturalWidth
+'\u00d7'+img.naturalHeight+')';var
padding = 2*parseInt(getComputedStyle
(document.body).padding, 10);var s =
document.querySelector('style[media]')
;s.media = '(max-width:' +
(img.naturalWidth + padding) + 'px),(max-
height:' + (img.naturalHeight + padding) +
'px)';zoomX = img.naturalWidth/2;zoomY =
img.naturalHeight/2;} else if (img.error)
{clearInterval(interval);}}, 100);function
modKey(e) { return e.altKey || e.ctrlKey ||
e.metaKey || e.shiftKey; }img.onclick =
function(e) {if (e.button == 0 && !modKey(e)
) {var s = getComputedStyle(img);if
(s.cursor == 'zoom-in') {zoomX =
e.offsetX;zoomY = e.offsetY;var clientAspect
= img.clientWidth/img.clientHeight;var
naturalAspect = img.naturalWidth/
img.naturalHeight;var scale;if
(naturalAspect > clientAspect) {var
displayHeight = img.clientWidth/
naturalAspect;zoomY -= (img.clientHeight -
displayHeight)/2;scale = img.clientWidth/
img.naturalWidth;} else {var displayWidth =
img.clientHeight*naturalAspect;zoomX -=
(img.clientWidth - displayWidth)/2;scale =
img.clientHeight/img.naturalHeight;}
zoomX /= scale;zoomY /= scale;zoomIn();}
else if (s.cursor == 'zoom-out') {zoomOut();}}
};window.onkeypress = function(e) {if
(e.keyCode == 13 && !modKey(e)) {var s =
getComputedStyle(img);if (s.cursor ==
'zoom-in')zoomIn();else if (s.cursor ==
'zoom-out')zoomOut();e.preventDefault();}}
;var drag;window.ondragstart = function(e)
{if (document.body.className == 'zoom')
e.preventDefault();};window.onmousedown
= function(e) {if (e.button == 0 && !modKey
(e) && document.body.className ==
'zoom')drag = {screenX: e.screenX,screenY:
e.screenY,scrollX: window.scrollX,scrollY:
window.scrollY};};window.onmouseup =
function(e) {img.style.cursor = '';drag =
undefined;};window.onmousemove =
function(e) {if (!drag)
return;img.style.cursor =
'move';window.scrollTo(drag.scrollX +
drag.screenX - e.screenX,drag.scrollY +
drag.screenY - e.screenY);};})(); </script></
body></html>
I couldn't find the page, how then the source. Where's the page? That's an image.
Re: Challenge! You Cant View This Page Source Code! by seunthomas: 10:07pm On Jun 09, 2015
LOL. its not so difficult, what they did is regenerate an image every few secounds. The page itself is an image. If you examing the code using developer console, you will see that the server is just spitting out jpeg file. Basically your page is just generating an image.
Re: Challenge! You Cant View This Page Source Code! by uvalued(m): 2:48pm On Jun 10, 2015
Craigston:

I couldn't find the page, how then the source. Where's the page? That's an image.

LOL. its not so difficult, what they did is regenerate an image every few secounds. The page itself is an image. If you examing the code using developer console, you will see that the server is just spitting out jpeg file. Basically your page is just generating an image.

http://devrijehuisarts.org/test/noViewSource.asp

thats the source. yes it looks like an image. What am interested in, did you right click and see "VIEW SOURCE"? That is what am interested in. How did the developer grayed out the "VIEW SOURCE" option when you right click?
Re: Challenge! You Cant View This Page Source Code! by AAinEqGuinea: 4:43pm On Jun 10, 2015
uvalued:




http://devrijehuisarts.org/test/noViewSource.asp

thats the source. yes it looks like an image. What am interested in, did you right click and see "VIEW SOURCE"? That is what am interested in. How did the developer grayed out the "VIEW SOURCE" option when you right click?

Peeking breaks it

1 Share

Re: Challenge! You Cant View This Page Source Code! by seunthomas: 7:05pm On Jun 10, 2015
Its simple again. You cant view source for an image. The developer did not gray out anything.

1 Like

(1) (Reply)

Has Anyone Seen This Type Of URL Before / Nairaland Is Anti-ponzi Scheme, Moderator But Why Are You Allowing Ponzi Here? / Diary Of A Computer Science Student.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 22
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.