SitePoint Sponsor

User Tag List

Results 1 to 19 of 19
  1. #1
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Question encrypting HTML code

    HI
    does any one know about encrypting HTML code?? One method that I know is by JavaScript & the script is available at www.dynamicdrive.com. I have attached this text file that contains an encrypted HTML source. Part of it is done by that DynamicDrive script but the rest, I can't guess. Its pretty good by the looks of it. Can any one tell me how its done & if I can get a free script somewhere to do encryption & decryption.
    Attached Files Attached Files
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  2. #2
    011521 dbalsdon's Avatar
    Join Date
    Feb 2003
    Location
    North Of Scotland
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by asp_funda
    does any one know about encrypting HTML code??
    yep. in my opinion, pointless.
    Daniel Balsdon
    My Site

  3. #3
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I'm not sure exactly how it's done but as has already been pointed out, it's essentially useless. Anyone with the intent and very basic programming knowledge can decode it and gain access to your source.

    The way it works is by encoding your source (not entirely sure how, probably with regex or something along those lines), and then in the resulting HTML file, it puts a Javascript function to decode the string and the encoded source. Anyone with half a brain can copy the code and pass your encoded string to the Javascript function and ta-da, no worries.

  4. #4
    SitePoint Addict BenANFA's Avatar
    Join Date
    Apr 2003
    Location
    Bath, UK
    Posts
    353
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See this page http://www.vortex-webdesign.com/help/hidesource.htm which is
    1. funny
    2. gives several methods of getting round any encryption techniques people might use
    Last edited by BenANFA; Sep 29, 2003 at 05:00.

  5. #5
    SitePoint Addict BenANFA's Avatar
    Join Date
    Apr 2003
    Location
    Bath, UK
    Posts
    353
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And attached is the decrypted source of your page using the Reveal Generated Source from the URL I posted.
    Attached Files Attached Files
    Last edited by BenANFA; Sep 29, 2003 at 05:19.

  6. #6
    011521 dbalsdon's Avatar
    Join Date
    Feb 2003
    Location
    North Of Scotland
    Posts
    444
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BenANFA
    See this page http://www.vortex-webdesign.com/help/hidesource.htm which is
    funny
    gives several methods of getting round any encryption techniques people might use
    that is funny
    Daniel Balsdon
    My Site

  7. #7
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I found a HTML encrypted site the other day. I copied it to a file and at the end I added
    Code:
    <script>alert(document.body.innerHTML)</script>
    That showed how easy it was to decipher.........

    Also, buy hiding the HTML code you hide it from search engines as well, as they read your HTML only for indexing
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  8. #8
    Apache Expert i_like_php's Avatar
    Join Date
    Nov 2001
    Location
    Dallas, Texas
    Posts
    1,342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    unless your code is some top goverment secret then, it would be pretty pointless to encrypt your web pages.

    i mean it doesn't make you look professional, instead it makes you like an amateur it's just source code, so why the need to hide it baffles me.
    i love php

  9. #9
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Markdidj
    I found a HTML encrypted site the other day. I copied it to a file and at the end I added
    Code:
    <script>alert(document.body.innerHTML)</script>
    That showed how easy it was to decipher.........

    Also, buy hiding the HTML code you hide it from search engines as well, as they read your HTML only for indexing
    didn't work for this page, but this did............
    Code:
    <textarea id="test"></textarea>
    <script>alert(x); window.onload=function() {document.getElementById("test").value=document.body.innerHTML}</script>
    I don't understand why I had to put the alert in first, but it seemed to make it work.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  10. #10
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    HTML is HTML, you do it well, or you do it bad. It never changes. It only affects what the page looks like. Server-side languages, on the other hand,m are used to access and modify data, therefor they are worth encrypting. HTML is not.
    Mike
    It's not who I am underneath, but what I do that defines me.

  11. #11
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by naramation
    Server-side languages........................ are worth encrypting. HTML is not.
    Well, I don't think that there's a need to encrypt server-side languages since that code is not sent to the client. Its executed at the server & is stipped out of a page before the page is sent to the client & ofcourse if you are not using some tinpot server that's accessible to every Tom & Dick, I wonder why one would bother to encrypt the server side code.

    On the other hand, encryption of server side code is pretty much weak as that of HTML.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  12. #12
    Team SitePoint AlexW's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne
    Posts
    832
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    What is so valuable in your HTML that you would bother encrypting it?

    However you write it, it's still garden-variety HTML . Like 'this is a heading'... 'this is a paragraph'. There's about as much magic to it as there is to setting a table. Knives go on the right, forks on the left... Make sure they're shiny clean and get em nice and straight and your job is done.

    In fact, if we can't understand exactly what you're doing with it just by looking at the rendered result you're probably not writing it very well.
    Alex Walker
    SitePoint Developer
    SitePoint - Learnable

  13. #13
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, HTML Code is not special, no need in encrypting it. If you want me to see your website, I'll be able to do whatever I want with it; trust me
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  14. #14
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wowzers! Lookie! Source code!
    Attached Files Attached Files
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  15. #15
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    no there's nothing special about HTML code, nor that's the case with me. I just want to know the different ways of doing it. Learning a thing & applying it are 2 different issues. Just for my knowledge I want to know it.
    The method that uses [B]unescape[B] function of JavaScript, that I know. but the one used in the file attached above, I didn't know about it & so I want to know if there's a free script available that encrypts & de-crypts it like that so that I can look at the script & learn something from it.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  16. #16
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know what method that uses, I didn't look close enough. I just use Mozilla to copy the XML.

    And SP still hasn't approved my attachment. Grrrr.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  17. #17
    SitePoint Wizard silver trophybronze trophy asp_funda's Avatar
    Join Date
    Jun 2003
    Location
    ether
    Posts
    4,497
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I think its encrypting in hexadecimal format like DJ P@CkMaN mentioned above. But I still haven't found a script for it. Still Looking.
    Our lives teach us who we are.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Me - Photo Blog - Personal Blog - Dev Blog
    iG:Syntax Hiliter -- Colourize your code in WordPress!!

  18. #18
    SitePoint Member
    Join Date
    Aug 2004
    Location
    Everett
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're REALLY serious about HTML encryption check out this:
    http://www.xice.net/webprotect.html

    That script provides true encryption not just changing the encoding. It encrypts the source with a password, and the password is not stored in the file. It's crazy style.

  19. #19
    Team SitePoint AlexW's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne
    Posts
    832
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spudge
    If you're REALLY serious about HTML encryption check out this:
    http://www.xice.net/webprotect.html

    That script provides true encryption not just changing the encoding. It encrypts the source with a password, and the password is not stored in the file. It's crazy style.
    So, you can't read the page without knowing the password? There would seem to be much simpler ways of keeping people away from a page.

    The encryption that people are talking about here, is to allow normal rendering of the page, but NOT allow them to view/use the source code.

    Plus, I'm not sure I'd want to be runnning someone elses Google ads either.
    Alex Walker
    SitePoint Developer
    SitePoint - Learnable


Bookmarks

Posting Permissions

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