javascript

Email, phone, text obfuscation javascript

Insert this code 
<script>
(function(w, undefined){
    var OBF = {
        offset: -5, //change this
        range: 11,  //change this
        process: function( s, d){
            var out = '',i;
            for(i=0;i<s.length;i++){
                out += String.fromCharCode(
                    s.charCodeAt(i)
                        + d*this.offset 
                        + d*(i%this.range)
                );
            };
            return out;
        }
        ,encode: function(s){ return this.process(s, 2); } 
        ,decode: function(s){ return this.process(s,-2); }
    };
    w.OBF = OBF;
})(window);
function enc(str, encoding = 'utf-8') { return btoa(str); }
function dec(str, encoding = 'utf-8') { return atob(str); }
var test = "al1tcA=="; //change variable and obfuscated text
</script>

How include in HTML
<text id="test"></text>
<script>document.getElementById("test").innerHTML = OBF.decode(dec((p)));</script>


How to encode text
console.log (enc(OBF.encode( 'your text' )));

Decode obfuscated text
console.log ('obf to raw = ' + OBF.decode(dec('al1tcA==')) );

admin

Share
Published by
admin

Recent Posts

vCenter Converter Standalone 9 download

vCenter Converter Standalone 9.0.0 download (далее…)

2 месяца ago

Download Service Pack for ProLiant (SPP) 2026.03 Gen10 and 10 Plus torrent

Service pack for HPE ProLiant Gen10 and 10 Plus (ver 2026.03.00.00) (SPP2026030000.2026_0326.14.iso) Service Pack for…

3 месяца ago

Download Service Pack for ProLiant (SPP) 2026.01 Gen10 and 10 Plus torrent

Service pack for HPE ProLiant Gen10 and 10 Plus (ver 2026.01.00.00) (SPP2026010000.2026_0206.13.iso) Service Pack for…

4 месяца ago

Wireguard on Mikrotik RouterOS 7

# add wg interface /interface/wireguard/add listen-port=51820 mtu=1300 # add ip on wg interface /ip/address/add address=10.100.10.1…

6 месяцев ago

VMware remote console (VMRC) 13 download

VMware remote console (VMRC) 13.0.1 download Last version: VMware Remote Console 13.0.1 | 29 Sept…

7 месяцев ago

Download Service Pack for ProLiant (SPP) 2025.01 Gen10 torrent

Gen10 Service Pack for ProLiant (SPP) Version 2025.01 Service Pack for ProLiant 2025.01 Gen10(P81139_001_gen10spp-2025.01.00.00-SPP2025010000.2025_0119.14.iso 8.22…

1 год ago