How to Protect Your Site Template With Footer credits and Encrypted scripts

Blogger users using free custom built third party blogger templates would have noticed the unremovable footer credits in their templates.

Third party blogger template makers like Sora-templates, Piki-templates, Igniel, Jago-design and others, make use of this implementation to protect and keep credits for their free templates, you will only get to remove it freely if you purchase their premium version of the template.

Template makers are another set of super heros alive on the web; with their dedication and skills, they create designs which give sites thier identity.

Most times, the sole purpose of making these website templates is to sell them and many template designers are kind enough to make their template free. Even if they don't get cash from some users, there is still joy and pride in their work which is their credit. 

How to Protect Your Site Template With Footer credits and Encrypted scripts

I know lots of template designers are looking for a way to implement this to protect their projects or websites. In this post, I would be sharing how to do it. This can also be implemented on WordPress sites, and any other site build as long as html, css and JavaScript is applicable. 

This code even tackles the hack to remove footer credit with no redirection on blogger template. The hack works on most templates but can't bypass this script.

Thanks for your good work creating templates and now with this code implemented, your credits won't be tampered with.

Note that the script shared here protects templates by 96%. We all know that in the world of coding, the way you code something is the same way it can be decided or bypassed. But still, 96% is a good percentage of protection.

Template Protection Using Footer Credit Link.

This is the basic implemention used by template to keep the credit (designer name) in the footer of your site. Something like "this site is designed by SDavidPrince" we all always see this thing and love it 🤥.

How it works

With this implemented, if someone tries to abuse your rights to a template by changing or removing the credits, the user site will be closed and redirected to your site or the link.I will explain in the installation.

How to Install

First, copy the link code and place it in the footer section of your template where you want the link to be displayed. It is just an <a href> tag, just ensure its id is "template-by"

<a id="template-by" href="https://www.sdavidprince.space" rel="dofollow " target="_blank" title="S David Prince">By S David Prince</a>

Then change the link https://www.sdavidprince.space with your  link, and also change the rest of the marked area with your Name


Second: search for </body> Put the below code directly above it.

<script type="text/javascript">
  //<![CDATA[
var _0x4c71bb=_0x51fd;function _0x2c4d(){var _0x5b4139=['location','getComputedStyle','1068975vyPfbl','4hEPodQ','736NqBLzo','offsetHeight','visibility','133924HFcQVD','28472GuLUxB','href','https://www.sdavidprince.space','display:initial!important;font-size:\x20inherit!important;color:\x20#fff!important;background:\x20#454fff!important;border-radius:\x2036px!important;padding:3px\x2010px!important;visibility:\x20visible!important;z-index:\x2099!important;opacity:\x201!important;','template-by','56848FOwdCK','2930AolLWR','5912544cLhIpi','89vqlJJK','1090130eqVgJX','getElementById','offsetWidth','fontSize','style','10278945WWULGc','display','onload'];_0x2c4d=function(){return _0x5b4139;};return _0x2c4d();}function _0x51fd(_0x2d49fb,_0x4bee11){var _0x2c4d38=_0x2c4d();return _0x51fd=function(_0x51fd5f,_0x36644e){_0x51fd5f=_0x51fd5f-0x10d;var _0x36f223=_0x2c4d38[_0x51fd5f];return _0x36f223;},_0x51fd(_0x2d49fb,_0x4bee11);}(function(_0x5f1318,_0x248cf6){var _0x579323=_0x51fd,_0x19ca16=_0x5f1318();while(!![]){try{var _0x3a2a1f=parseInt(_0x579323(0x125))/0x1*(-parseInt(_0x579323(0x11d))/0x2)+-parseInt(_0x579323(0x117))/0x3+-parseInt(_0x579323(0x118))/0x4*(-parseInt(_0x579323(0x10d))/0x5)+parseInt(_0x579323(0x124))/0x6+-parseInt(_0x579323(0x11c))/0x7*(-parseInt(_0x579323(0x119))/0x8)+parseInt(_0x579323(0x112))/0x9+parseInt(_0x579323(0x123))/0xa*(-parseInt(_0x579323(0x122))/0xb);if(_0x3a2a1f===_0x248cf6)break;else _0x19ca16['push'](_0x19ca16['shift']());}catch(_0x4ae3e6){_0x19ca16['push'](_0x19ca16['shift']());}}}(_0x2c4d,0xec5d2),window[_0x4c71bb(0x114)]=function(){var _0x3f857e=_0x4c71bb,_0x5ee8ee=_0x3f857e(0x11f),_0x53646f=_0x3f857e(0x121);function _0x48e3a5(_0x3648d9){var _0x184e53=_0x3f857e,_0x569a9f=window[_0x184e53(0x116)](_0x3648d9);return _0x569a9f[_0x184e53(0x113)]!=='none'&&_0x569a9f[_0x184e53(0x11b)]==='visible'&&_0x569a9f['opacity']>0x0&&_0x3648d9[_0x184e53(0x10f)]>0x0&&_0x3648d9[_0x184e53(0x11a)]>0x0&&parseFloat(_0x569a9f[_0x184e53(0x110)])>=0x5;}var _0x4f3f11=document[_0x3f857e(0x10e)](_0x53646f);!_0x4f3f11||_0x4f3f11['getAttribute'](_0x3f857e(0x11e))!==_0x5ee8ee||!_0x48e3a5(_0x4f3f11)?window[_0x3f857e(0x115)][_0x3f857e(0x11e)]=_0x5ee8ee:_0x4f3f11['setAttribute'](_0x3f857e(0x111),_0x3f857e(0x120));}); 
//]]>
    </script>

Then change the url to yours.


Encryption Protection

This is an extra method of protecting your template by encrypting your JavaScript code by obfuscating it.

As you see, the above shared code is encrypted. It is not easy to read it and quickly make changes to it.

To obfuscate this script, you can use an online tool such as Obfuscator.io or JavaScript Obfuscator.

If the above code is not encrypted, it would be easier for anyone to modify it, therefore nullifying the protection.


Extra Mile Protection

When obfuscating your script, make sure you enable the encoding options like options for string encoding and control flow flattening for maximum obfuscation. 

This is to make sure code is not easily editable as it would all be encoded including all strings and even the url;

or

 Encode the URL manually before obfuscation by using Base64 encoding.

To do this, include a Base64 decoding function in the script and usse the decoded URL in your logic.

The encoded URL for https://www.sdavidprince.space is aHR0cHM6Ly93d3cuc2RhdmlkcHJpbmNlLnNwYWNl.


This way, users wont be able to bypass in anyway by changing the url - Even a geek would find it hard to know or even notice what this script is for.

Example: Using the Above Script - Manual encode and decode done

<script type="text/javascript">
        (function() {
            function _0x2b58(_0x37fdb8, _0x225c7d) {
                const _0x46cb00 = _0x46cb();
                return _0x2b58 = function(_0x2b5829, _0x3b3af8) {
                    _0x2b5829 = _0x2b5829 - 0x1a6;
                    let _0x5b66df = _0x46cb00[_0x2b5829];
                    return _0x5b66df;
                }, _0x2b58(_0x37fdb8, _0x225c7d);
            }
            const _0x5a1f04 = _0x2b58;
            (function(_0x57d7f4, _0x3c3b84) {
                const _0x432cbe = _0x2b58, _0x21e989 = _0x57d7f4();
                while (!![]) {
                    try {
                        const _0x5d1f4f = parseInt(_0x432cbe(0x1b0)) / 0x1 + parseInt(_0x432cbe(0x1a8)) / 0x2 * (parseInt(_0x432cbe(0x1b6)) / 0x3) + parseInt(_0x432cbe(0x1b8)) / 0x4 * (-parseInt(_0x432cbe(0x1ac)) / 0x5) + parseInt(_0x432cbe(0x1b5)) / 0x6 * (-parseInt(_0x432cbe(0x1b1)) / 0x7) + parseInt(_0x432cbe(0x1aa)) / 0x8 * (parseInt(_0x432cbe(0x1b7)) / 0x9) + -parseInt(_0x432cbe(0x1ae)) / 0xa + -parseInt(_0x432cbe(0x1ab)) / 0xb;
                        if (_0x5d1f4f === _0x3c3b84) break;
                        else _0x21e989['push'](_0x21e989['shift']());
                    } catch (_0x5c150a) {
                        _0x21e989['push'](_0x21e989['shift']());
                    }
                }
            }(_0x46cb, 0x5a244));
            function _0x46cb() {
                const _0x5b95f7 = ['none', 'visibility', 'attr', 'fontSize', 'setAttribute', 'getAttribute', '1613776pKTeMe', 'opacity', '2474442iZPusv', 'location', '7TjXpIq', 'href', 'https://www.sdavidprince.space', 'inherit!important;font-size:', 'aHR0cHM6Ly93d3cuc2RhdmlkcHJpbmNlLnNwYWNl', 'background:', 'split', 'style', 'dofollow', '34952ZtcxzK', 'outerHTML', 'display', '4rLDfHT', 'replace', 'text', '18aSzbPe', 'davidprince', '22xvJZiw', 'https:', 'ZJSPH', 'PxRl', '1182344szxGbi', 'substring', '8foTImT', 'opacity:', 'call', 'slice', 'PXfl', 'initial!important;font-size:', 'setAttributeNS', 'By S David Prince', 'setTitle', '11ElDGQO', 'set', 'visibility:', 'getOwnPropertyDescriptor', 'split', 'split', 'background:', 'initial!important', 'isInteger', 'fromCharCode', 'title', 'david', 'title', 'david', 'split', 'initial!important', 'display', '2fJlLjT', 'url', 'display', 'opacity', 'opacity:', 'initial!important', 'opacity', 'initial!important', 'initial!important', 'true', 'split', 'style', 'true', 'true', 'true', 'split', 'style', 'true', 'split', 'true', 'true', 'true', 'true', 'true', 'split', 'split', 'background:', 'split', 'true', 'true', 'true', 'split', 'true', 'true', 'true', 'split', 'true', 'true', 'true
....'''//moremoremore just an examplenot useful 


Another addtional implematation to put in place is to add important scripts that run your site in footer script by encapsulating all functionality within the same obfuscated script.

<script type="text/javascript">
  //<![CDATA[
var _0x4c71bb=_0x51fd;function _0x2c4d(){var _0x5b4139=['location','getComputedStyle','1068975vyPfbl','4hEPodQ','736NqBLzo','offsetHeight','visibility','133924HFcQVD','28472GuLUxB','href','https://www.sdavidprince.space','display:initial!important;font-size:\x20inherit!important;color:\x20#fff!important;background:\x20#454fff!important;border-radius:\x2036px!important;padding:3px\x2010px!important;visibility:\x20visible!important;z-index:\x2099!important;opacity:\x201!important;','template-by','56848FOwdCK','2930AolLWR','5912544cLhIpi','89vqlJJK','1090130eqVgJX','getElementById','offsetWidth','fontSize','style','10278945WWULGc','display','onload'];_0x2c4d=function(){return _0x5b4139;};return _0x2c4d();}function _0x51fd(_0x2d49fb,_0x4bee11){var _0x2c4d38=_0x2c4d();return _0x51fd=function(_0x51fd5f,_0x36644e){_0x51fd5f=_0x51fd5f-0x10d;var _0x36f223=_0x2c4d38[_0x51fd5f];return _0x36f223;},_0x51fd(_0x2d49fb,_0x4bee11);}(function(_0x5f1318,_0x248cf6){var _0x579323=_0x51fd,_0x19ca16=_0x5f1318();while(!![]){try{var _0x3a2a1f=parseInt(_0x579323(0x125))/0x1*(-parseInt(_0x579323(0x11d))/0x2)+-parseInt(_0x579323(0x117))/0x3+-parseInt(_0x579323(0x118))/0x4*(-parseInt(_0x579323(0x10d))/0x5)+parseInt(_0x579323(0x124))/0x6+-parseInt(_0x579323(0x11c))/0x7*(-parseInt(_0x579323(0x119))/0x8)+parseInt(_0x579323(0x112))/0x9+parseInt(_0x579323(0x123))/0xa*(-parseInt(_0x579323(0x122))/0xb);if(_0x3a2a1f===_0x248cf6)break;else _0x19ca16['push'](_0x19ca16['shift']());}catch(_0x4ae3e6){_0x19ca16['push'](_0x19ca16['shift']());}}}(_0x2c4d,0xec5d2),window[_0x4c71bb(0x114)]=function(){var _0x3f857e=_0x4c71bb,_0x5ee8ee=_0x3f857e(0x11f),_0x53646f=_0x3f857e(0x121);function _0x48e3a5(_0x3648d9){var _0x184e53=_0x3f857e,_0x569a9f=window[_0x184e53(0x116)](_0x3648d9);return _0x569a9f[_0x184e53(0x113)]!=='none'&&_0x569a9f[_0x184e53(0x11b)]==='visible'&&_0x569a9f['opacity']>0x0&&_0x3648d9[_0x184e53(0x10f)]>0x0&&_0x3648d9[_0x184e53(0x11a)]>0x0&&parseFloat(_0x569a9f[_0x184e53(0x110)])>=0x5;}var _0x4f3f11=document[_0x3f857e(0x10e)](_0x53646f);!_0x4f3f11||_0x4f3f11['getAttribute'](_0x3f857e(0x11e))!==_0x5ee8ee||!_0x48e3a5(_0x4f3f11)?window[_0x3f857e(0x115)][_0x3f857e(0x11e)]=_0x5ee8ee:_0x4f3f11['setAttribute'](_0x3f857e(0x111),_0x3f857e(0x120));});
// Other Critical Script should be Here

//]]>
    </script>

This should be done, because a user can delete the redirection protect code from your template, therefore nullifying it's protection. When you add other important scripts that run your site with the function, and when the script is tampered with, the user site would break.

And congratulations. That's how it's done.

Continue making great templates. 🤗

Please write your comments or send a webmention
Webmention Notice

This site accepts Webmentions via webmention.io/www.sdavidprince.space/webmention. You can also reply to syndicated posts, and your responses may be backfed (posted back here) via brid.gy.

What does all these mean? Read more about it. Respect this and keep mentions relevant.

Dark/Light
Font Size
A-
A+

Additional Widgets

Translate

Explore: Navigation