Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 46

Thread: how to hide a source code

  1. #21
    Senior Member
    Join Date
    Oct 2001
    Posts
    346
    If I may make a small point about your post, Tim...

    My code is designed to disable right click, yes... (and left+right) - but there's a reason I also suggested setting frames.

    You can set a no-size frame, and the site displays as normal... but the only code they get from View Source is the frame code :P

    Anyhow, good post.

    Regards,

    SSJVegeta-Sei


    Pierce me with steel, rend me with claw and fang; as I die, a legend is born for another generation to follow.
    An\' it harm none, do as ye will. - Wiccan Rede

  2. #22
    Senior Member
    Join Date
    Oct 2001
    Posts
    786
    Ah, I acturally spent like 40 minutes typing that up so I didn't see your post while writing it. ;p

    That's a pretty good deterent for most people. Most people wouldn't think of how to get the page pointed to in the index.html and if you set the page you're protecting to ensure it reloads inside of frames can cause some problems for their attempts. (thumbs up)
    Not everyone thinks about making a link and then right clicking it -> save target as either. I certainly didn't think of the link until someone was very intent on getting a small piece of code I wrote and showed me how they got it by making a hyperlink and save target as. (This code was some sort of crash IE code with a malformed tag, so view source wasn't an option there...and he had to use IE to get it and the cache was too cumbersome...)


    My main target was at obfusecuation (sp?) of pages that I've come across at times. Mainly showing examples of what can be done to counter that. Writing a small tut on javascript has crossed my mind at times, but I want to include examples and that means I have to go code them myself. Sort of a "hack this javascript web page" challenge that I thought about before but made into tutorial form demonstrating ways to either recode it or find vulnerabilities in implementation...

  3. #23
    Senior Member Wazz's Avatar
    Join Date
    Apr 2003
    Posts
    288
    I thought he meant to hide it from the average Joe, not people like us LOL
    "It is a shame that stupidity is not painful" - Anton LaVey

  4. #24
    like wat other said you can use javascript to disable the right click you can get it at www.javascript.com and if you wanted more secure you can use the php script but your server must be php enable so that you canuse it but i prefer using php script rather than disabling the right click coz there is other way to find or to look for your script

  5. #25
    AO Antique pwaring's Avatar
    Join Date
    Aug 2001
    Posts
    1,409
    Have you any idea how annoying it is to disable right-clicking? I use the right mouse button all the time in mozilla and it drives me insane when people use javascript because it stops me from opening links in new tabs, quick access to reload/bookmark a page etc. If I wanted to steal your images/HTML, I would do so and there's nothing you can do to stop me. Heck, if I wanted your HTML that badly I'd use lynx/links to grab the source instead.

    BTW, PHP isn't much use for hiding your code for two reasons:
    1. It outputs HTML which is then sent to the browser (obviously the PHP code is protected, but we're talking about HTML here)
    2. It doesn't work on the client-side, so I can still right-click, View->Source or whatever to get at the HTML code

    Easiest way to get around those frames is either to right-click within the frame and choose 'view source of this frame' (or whatever the option is) or view the code for the frameset and then load the frame individually (with Javascript disabled to prevent the frames re-appearing automatically).

    You can certainly make it more difficult for the average user to access the code, but you can't stop anyone who's determined to get at it. It just wastes your time developing the site, damages your search engine rankings (especially if you use excessive javascript/frames for your content) and annoys the hell out of people like me who like to surf the web with the shortcuts provided by the right mouse button menus.
    Paul Waring - Web site design and development.

  6. #26
    Have you any idea how annoying it is to disable right-clicking? I use the right mouse button all the time in mozilla
    Heh, it is nice to be able to open in new window. Also as someone previously said, just make a basic neandrithal (spelling) browser in VB. The have the page source written to a text box. In the end, why protect HTML? The important things to protect are your information and perhaps your images.

    -Cheers-

    PS: Happy New Year, late like.

  7. #27
    Junior Member
    Join Date
    Jan 2004
    Posts
    1
    there is no 100% sure way of hiding your source code . but, I have some tricks, first, to disable the right click menu only in IE I have a smaller code <oncontextmenu="return false">. and secondly , open your code in notepad and insert around 900-1000 carriage returns above the <html> tag. and above that insert a confusing tag like <!-- Unable to decrypt $3aAb^. Source code not available--> or <!--Data Source not Found. File error #546--> or anything like that , u should have got the Idea what I mean to say.. but note that these tags have been inserted as comments otherwise they would appear on your page. this trick is also used by some softwares , I think. So with these tricks when the user will open the code he will get that message ( confusing tag) and below that, totally blank page, unless he notices the small scroller on the right side. and also note that every single carriage return weighs 2 bit or 2 byte I don't remember exactly..

  8. #28
    Ninja Code Monkey
    Join Date
    Nov 2001
    Location
    Washington State
    Posts
    1,027
    Any tricks you have for it are just that, tricks. All smoke and snake oil. Anyone who wants your source can get it easily with half a brain and 10 minutes on google.
    "When I get a little money I buy books; and if any is left I buy food and clothes." - Erasmus
    "There is no programming language, no matter how structured, that will prevent programmers from writing bad programs." - L. Flon
    "Mischief my ass, you are an unethical moron." - chsh
    Blog of X

  9. #29
    Senior Member
    Join Date
    Aug 2003
    Posts
    1,018
    man its getting worse and worse. XqZorXpoZ go to roll col if u want to post your intro read the AO FAQ it shouldn't be that hard. i think a automated PM shouls be sent to every new account giving details about the site and the site FAQ

    go to ROll Col if you want to post your introductry note this is not the proper place for it . posting irrelevent data in between thread is intolerable. i suggest you delete and post in rollcol section
    Hmm....been mentioned before:http://www.antionline.com/showthread...hreadid=252877

    Oddly enough, it was put in the suggestions forum, which would be the proper place, instead of posting irrelevant data between threads (which I hear is intolerable) . Funny, I don't see a tag under your name that says AO police.

    / In best announcers voice:We now return you to your regularly scheduled program.

  10. #30
    Senior Member
    Join Date
    Oct 2001
    Posts
    346
    PWaring, it might be annoying, but I've run sites in the past where I REALLY DON'T want script kiddies running in, stealing all my images and using them somewhere else. People with the skills to take the stuff anyway probably A: won't find it worth their time and B: Are smart enough not to use proprietary images and such without asking first.

    Besides, I have a really sweet Flash popup to get into the site, and people disable popups all the time, so turnabout is fair play :P (J/K)

    Anyhow, in short, the script does exactly what it's designed to do, which is keep out your average moron. Which category I'm *sure* you're not a member of.

    Regards,

    SSJVegeta-Sei


    Pierce me with steel, rend me with claw and fang; as I die, a legend is born for another generation to follow.
    An\' it harm none, do as ye will. - Wiccan Rede

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •