Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Need to encrypt html source code...


  • Please log in to reply
9 replies to this topic

#1 chelk41

chelk41

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:03:07 AM

Posted 27 April 2016 - 02:21 AM

Hi all.. I have developed a new website and I want to encrypt the html source codes of the videos on the site. When I approached a cyber security solutions named NCI in Ontario for the need, they said that it is not possible. Is it right? Why is it so? Do you have any alternatives to suggest me? Please reply me as soon as possible.



BC AdBot (Login to Remove)

 


#2 Didier Stevens

Didier Stevens

  • BC Advisor
  • 2,685 posts
  • ONLINE
  •  
  • Gender:Male
  • Local time:11:37 PM

Posted 02 May 2016 - 03:06 PM

What goal do you want to achieve with encryption?

What is the problem you try to solve?


Didier Stevens
http://blog.DidierStevens.com
http://DidierStevensLabs.com

SANS ISC Senior Handler
Microsoft MVP 2011-2016 Consumer Security, Windows Insider MVP 2016-2019
MVP_Horizontal_BlueOnly.png

 

If you send me messages, per Bleeping Computer's Forum policy, I will not engage in a conversation, but try to answer your question in the relevant forum post. If you don't want this, don't send me messages.

 

Stevens' law: "As an online security discussion grows longer, the probability of a reference to BadUSB approaches 1.0"


#3 chelk41

chelk41
  • Topic Starter

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:03:07 AM

Posted 06 May 2016 - 04:11 AM

I want to hide the code from user visibility.



#4 Didier Stevens

Didier Stevens

  • BC Advisor
  • 2,685 posts
  • ONLINE
  •  
  • Gender:Male
  • Local time:11:37 PM

Posted 06 May 2016 - 04:42 AM

Can you be more specific? Because the code is already hidden for the user. A normal user doesn't see the code.


Didier Stevens
http://blog.DidierStevens.com
http://DidierStevensLabs.com

SANS ISC Senior Handler
Microsoft MVP 2011-2016 Consumer Security, Windows Insider MVP 2016-2019
MVP_Horizontal_BlueOnly.png

 

If you send me messages, per Bleeping Computer's Forum policy, I will not engage in a conversation, but try to answer your question in the relevant forum post. If you don't want this, don't send me messages.

 

Stevens' law: "As an online security discussion grows longer, the probability of a reference to BadUSB approaches 1.0"


#5 rp88

rp88

  • Members
  • 3,002 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:09:37 PM

Posted 07 May 2016 - 09:02 AM

A normal user doesn't see the code but if you right click and "view page source" or "view page info", it is quite visible. I guess,chelk41, that you know this and want to make sure users doing this can't fully understand the code. The question is why? What are you trying to do: link to video files in such a way that users cannot trace where they are hosted and download them for themselves? Use some unique piece of html coding you don't want others to replicate and copy on their own sites?
Back on this site, for a while anyway, been so busy the last year.

My systems:2 laptops, intel i3 processors, windows 8.1 installed on the hard-drive and linux mint 17.3 MATE installed to USB

#6 ButlerGames

ButlerGames

  • Members
  • 8 posts
  • OFFLINE
  •  
  • Local time:01:37 PM

Posted 16 May 2016 - 11:52 PM

More details as in why you want to hide the code -- and what specific code.  I understand you want to hide all of it, but it isn't possible to have this webpage display the same and have the "view source" be blank.



#7 freepizza

freepizza

  • Members
  • 3 posts
  • OFFLINE
  •  

Posted 14 June 2016 - 09:52 PM

I think you should tell us why

#8 Crazy Cat

Crazy Cat

  • Members
  • 808 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Lunatic Asylum
  • Local time:09:37 AM

Posted 27 August 2016 - 07:50 PM

http://www.htmlgoodies.com/beyond/article.php/3875651/Web-Developer-Class-How-to-Hide-your-Source-Code.htm

Code Encrypter. http://developers.evrsoft.com/encrypter.shtml

Scramble the source of any chunk of code, or the entire webpage, using this creative script. The encrypted code will still be interpreted properly by the browser, just difficult for us humans to read. It is recommended that you use this script to encrypt only the part(s) of your webpage that require encryption (ie: a script), rather than the entire page. This helps minimize the chance of any problems.

Other tools that will assist. http://developers.evrsoft.com/tools.shtml

Edited by Crazy Cat, 27 August 2016 - 07:51 PM.

 

Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. ― Albert Einstein ― Insanity is doing the same thing, over and over again, but expecting different results.

 

InternetDefenseLeague-footer-badge.png


#9 C0113c70r

C0113c70r

  • Members
  • 53 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:04:37 AM

Posted 05 September 2016 - 10:47 AM

HTML is interpreted by the web browser, not at the server. As such, you cannot "encrypt" HTML and expect it to be properly interpreted by the browser unless the browser was specifically designed to decrypt such files (which they aren't).

The best you can do is obfuscate the HTML. For example, that "Code Encrypter" linked to by Crazy Cat (#8) took this link -
 

<a href="http://www.yourlink.com">Fake Link</a>

and made it look like this in order to make it more difficult to read -
 

<script>
<!--
document.write(unescape("%3Ca%20href%3D%22http%3A//www.yourlink.com%22%3EFake%20Link%3C/a%3E"));
//-->
</script>

However, anyone who sees this will still be able to quickly figure out exactly what it is.

Using Base64 encoding, the HTML for the link given above appears as such -
 

aHR0cDovL3d3dy55b3VybGluay5jb20=

However, this encoded HTML cannot be used alone. It has to be wrapped in tags which will identify it as Base64, then anyone who knows anything about using Google to find Base64 decoders will easily be able to see your link.


Edited by C0113c70r, 05 September 2016 - 10:48 AM.

If you didn't get the answer you wanted to hear,

you were probably asking the wrong question.


#10 Crazy Cat

Crazy Cat

  • Members
  • 808 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Lunatic Asylum
  • Local time:09:37 AM

Posted 08 September 2016 - 06:22 PM

At C0113c70r, nice post. Yes, I could have elaborated more, but wasn't sure on the poster intentions?
 

Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. ― Albert Einstein ― Insanity is doing the same thing, over and over again, but expecting different results.

 

InternetDefenseLeague-footer-badge.png





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users