0

I want to encrypt the html and i want to get the result only in numbers and percentage. But i don't want to see any characters(A-Z,a-z). example, look at this website: https://www.webtoolhub.com/tn561359-html-encrypter.aspx

Encrypting using that website, only giving the numeric and percentage. I have gone through several questions on stack overflow. But some are saying it's not encrypting, it's some percent-encoding like that. I don't know that, but I need that output for one of my clients to secure the html code or any text. I tried, escape, encodeURI, encodeURIComponent, but no use. I see the characters in every attempt.

Please someone help me with this. For your reference i'm adding one line and that encryption of the line. line: Someone please help me how to achieve it. Encryption:

<script type="text/javascript">
<!-- HTML Encryption provided by www.webtoolhub.com -->
<!--
document.write(unescape('%53%6f%6d%65%6f%6e%65%20%70%6c%65%61%73%65%20%68%65%6c%70%20%6d%65%20%68%6f%77%20%74%6f%20%61%63%68%69%65%76%65%20%69%74%2e'));
//-->
</script>
  • 1
    This is not encryption. It is just encoding. If your goal is to prevent others from using your HTML code, this is not the way to do it. – Aziz May 17 '20 at 16:41
  • 1
    The technique is called obfuscating. And it does not work. I can just do `console.log(document.querySelector("html").innerHTML)` after page load, or 'inspect", select the html I want and copy it – mplungjan May 17 '20 at 16:42
  • Someone tagged my question to already answered question. To that guy, I saw that post, but my point is different, i have no problem showing the javascript code, i don't want to show the text or html. – prasad keratam May 17 '20 at 16:50
  • @mplungjan Thank you for the response. Can you show an example? I tried your code, but nope i didn't work. – prasad keratam May 17 '20 at 16:56
  • @prasadkeratam I just did. What part do you need help with? Is your website static or dynamic? If it is static, you need to encoding your HTML pages (similar to the example you've given). If dynamic, you will have to have some form of post-processing to encode the page before it is sent from the server. – Aziz May 17 '20 at 17:57

0 Answers0